Demonastery.org2023-04-05T19:42:00-05:00https://demonastery.org/https://demonastery.org/2023/04/using-monado-qwerty-driverUsing Monado QWERTY driver2023-04-06T12:00:00-05:002023-04-06T12:00:00-05:00<p>The <a href="https://monado.dev/">Monado</a> OpenXR implementation provides a "QWERTY" driver for testing applications using the keyboard and mouse.</p>
https://demonastery.org/2023/04/virtual-camera-and-audio-on-linuxVirtual camera and audio on Linux2023-04-04T15:00:00-05:002023-04-04T15:00:00-05:00<p>(The below content was made for NixOS, but the actual configuration should apply to any Linux distribution with Pipewire and other related packages)</p>
https://demonastery.org/2023/04/useful-nixos-snippetsUseful NixOS snippets2023-04-04T00:00:00-05:002023-04-04T00:00:00-05:00<p>Miscellaneous Nix snippets that I'm using in my configs. While I don't have sources for these, many have been found and remixed from the <a href="https://discourse.nixos.org">NixOS Discourse</a> and other places online.</p>
https://demonastery.org/2022/07/openbox-sticky-workspacesOpenbox sticky workspaces2022-07-17T00:00:00-05:002022-07-17T00:00:00-05:00<p>A feature I find useful in a multi-monitor environment is the ability to pin a workspace to a specific monitor, so that some windows can follow you between workspaces.</p>
https://demonastery.org/2022/05/custom-packages-with-nixosCustom packages with NixOS2022-05-16T00:00:00-05:002022-05-16T00:00:00-05:00<p>Building a simple C daemon with Nix, adding it into an existing NixOS configuration without modifying nixpkgs, and then wiring the daemon up to systemd.</p>
https://demonastery.org/2020/07/insert-file-as-base64insert-file-as-base642020-07-29T00:00:00-05:002020-07-29T00:00:00-05:00<p>Small Emacs function I used to base64 encode the icons in the <a href="/assets/main.css">CSS for demonastery.org</a>. Requires the GNU coreutils <code class="language-plaintext highlighter-rouge">base64</code> tool.</p>
https://demonastery.org/2020/05/window-capture-hotkey-obsWindow Capture hotkey for OBS2020-05-15T00:00:00-05:002020-05-15T00:00:00-05:00<p>OBS Studio allows you to configure a hotkey to change the captured window for a <code class="language-plaintext highlighter-rouge">Game Capture</code> source. However this ability to use a hotkey is missing from the <code class="language-plaintext highlighter-rouge">Window Capture</code> source.</p>
https://demonastery.org/2020/05/long-time-no-cLong time no C2020-05-08T00:00:00-05:002020-05-08T00:00:00-05:00<p>I'm spending some quality time with C again after a solid multi-year detour with Rust and I'm really enjoying myself.</p>
https://demonastery.org/2013/07/git-mpushPush multiple git remotes2013-07-21T00:15:00-05:002013-07-21T00:15:00-05:00<p>Push to multiple remotes with <code class="language-plaintext highlighter-rouge">git mpush origin,github master</code>.</p>
https://demonastery.org/2013/04/emacs-evil-narrow-regionBeing evil with narrow-to-region-indirect2013-04-21T23:55:00-05:002013-04-21T23:55:00-05:00<p>Emacs has a great vim emulation mode named <code class="language-plaintext highlighter-rouge">evil-mode</code>. Of course it is also trivial to extend. Here is an example of defining a custom operator for by using <code class="language-plaintext highlighter-rouge">evil-define-operator</code>:</p>
https://demonastery.org/2013/04/emacs-narrow-to-region-indirectNarrow-to-region-indirect for Emacs2013-04-18T08:25:00-05:002013-04-18T08:25:00-05:00<p>I'm once again an Emacs convert (spoken multiple times since this was first posted). I used Emacs a fair bit back in 2011 as my main editor (when <code class="language-plaintext highlighter-rouge">vimpulse</code> was becoming a viable alternative to native Vim and I forced Emacs upon myself for as long as I could), I <a href="http://demonastery.org/2010/10/sawfish-and-emacs-org-mode/">even</a> <a href="http://demonastery.org/2011/07/emacs-tip-vimpulse/">wrote</a> a <a href="http://demonastery.org/2011/05/org-agenda-sms-el/">few</a> <a href="http://demonastery.org/2009/05/automatic-agenda-notification/">posts</a> about extending it. But eventually it was starting to feel sluggish with everything I was throwing at it and I had to give it up (looking back, it was probably a bad minor-mode or two).</p>
https://demonastery.org/2013/02/litc-literate-program-compilerA literate-style program compiler'2013-02-28T20:45:00-06:002013-02-28T20:45:00-06:00<p><a href="http://en.wikipedia.org/wiki/Literate_programming">Literate programming</a>, introduced by Donald Knuth, is a technique of writing programs in the natural order and style that you would use if you were to verbally describe the way a program works. Literate programming is designed to break the order of source code required by traditional compilers. It can be fun to build programs in this way by simply starting a document with a description and a list of headers for each feature.</p>
https://demonastery.org/2012/11/monkey-patching-in-ruby"Monkey Patching" in Ruby2012-11-28T23:00:00-06:002012-11-28T23:00:00-06:00<p>I don't use a whole lot of Ruby in my day to day work, but it is a language that is very quickly growing on me for several reasons.</p>
https://demonastery.org/2012/11/jekyll-gitolite-hookA Jekyll hook for Gitolite2012-11-20T02:39:00-06:002012-11-20T02:39:00-06:00<p>I'm back again to share a quick hook for updating a mojombo/jekyll based website or blog upon pushing to sitaramc/gitolite.</p>
https://demonastery.org/2012/11/project-documentation-in-redmineLive project documentation in Redmine2012-11-17T18:27:00-06:002012-11-17T18:27:00-06:00<p>Continuing this <a href="/2012/10/a-redmine-hook/">series</a> of posts on <a href="/2012/09/a-hooking-system-for-gitolite/">Gitolite hooks</a>, this time I will be adding live project documentation to Redmine, using <a href="http://www.doxygen.org">Doxygen</a>.</p>
https://demonastery.org/2012/10/skypekit-transport-for-dcbotA SkypeKit transport for DCBot2012-10-29T04:30:00-05:002012-10-29T04:30:00-05:00<p>A couple of posts back I walked through putting together a (somewhat) <a href="http://demonastery.org/2012/07/building-a-decoupled-irc-bot-part-zero/">decoupled bot system</a> using <a href="http://zero.mq">ZeroMQ</a> and a bunch of scripts in various languages.</p>
https://demonastery.org/2012/10/a-redmine-hookA Redmine hook for repo updates2012-10-27T19:50:00-05:002012-10-27T19:50:00-05:00<p>In my last post I showed how to build a simple <a href="/2012/09/a-hooking-system-for-gitolite">hooking system</a> for sitaramc/gitolite Now I just want to share a very small script used to update <a href="http://redmine.org">Redmine</a> changesets when you push to a git repository.</p>
https://demonastery.org/2012/09/a-hooking-system-for-gitoliteA hooking system for Gitolite2012-09-07T06:42:00-05:002012-09-07T06:42:00-05:00<p>sitaramc/gitolite is a wonderful tool that makes hosting git repositories pain-free. Gitolite also supports adding custom hooks but for whatever reason I found it a little hard to get my head around for what I wanted (a <code class="language-plaintext highlighter-rouge">post-receive</code> hook per repository).</p>
https://demonastery.org/2012/08/building-a-decoupled-irc-bot-part-twoBuilding a decoupled IRC bot. Part Two: Functionality2012-08-04T07:44:00-05:002012-08-04T07:44:00-05:00<p>Welcome to part three of this series. In this post I'm going to show how easy it is to turn what is currently a completely useless bot into something genuinely useful to you and your team.</p>
https://demonastery.org/2012/07/building-a-decoupled-irc-bot-part-oneBuilding a decoupled IRC bot. Part One: Transports2012-07-21T07:20:00-05:002012-07-21T07:20:00-05:00<p><em>First rule of writing blog posts, don't give yourself arbitrary deadlines! :)</em></p>
https://demonastery.org/2012/07/building-a-decoupled-irc-bot-part-zeroBuilding a decoupled IRC bot. Part Zero: Core2012-07-15T15:30:00-05:002012-07-15T15:30:00-05:00<p>In todays episode of demonastery.org I'm going to build yet another IRC bot!</p>
https://demonastery.org/2012/07/lambda-conceal-in-vimLambda concealing in Vim2012-07-12T20:30:00-05:002012-07-12T20:30:00-05:00<p>One of the features I miss the most from Emacs when using Vim is the ability to mask certain strings as other strings (eg. Unicode symbols). The most often used case for this is when dealing with Greek characters (such as <em>lambda</em>), or when writing Tex.</p>
https://demonastery.org/2012/01/logpixels-dpi-hackLogPixels DPI hack2012-01-04T00:00:00-06:002012-01-04T00:00:00-06:00<p>Here's a handy tip for those netbook users out there in dire need of more screen estate.</p>
https://demonastery.org/2011/11/docstrings-in-my-chickenDocstrings in my Chicken?2011-11-13T00:00:00-06:002011-11-13T00:00:00-06:00<p>Here's a little bit of amateur code to enable the use of <a href="http://en.wikipedia.org/wiki/Docstring">docstrings</a> in Chicken Scheme.</p>
https://demonastery.org/2011/07/emacs-tip-vimpulseEmacs Tip: Vimpulse2011-07-07T00:00:00-05:002011-07-07T00:00:00-05:00<p>One thing I love about Emacs is that it is so extensible. I was an avid Vim user for a long time and it took me several tries to switch to Emacs, but I will never look back. With the <a href="http://gitorious.org/vimpulse">Vimpulse</a> addon to the built-in <code class="language-plaintext highlighter-rouge">viper-mode</code>, Emacs becomes a powerful Vim impersonator, capable of being extended with Emacs-Lisp.</p>
https://demonastery.org/2011/06/adding-freetype-to-our-demoAdding FreeType to our Demo2011-06-05T00:00:00-05:002011-06-05T00:00:00-05:00<p>Continuing on from my <a href="http://demonastery.org/60/chicken-scheme-and-opengl/">Chicken Scheme, and OpenGL</a> tutorial, I'm going to show you how to extend it to render pretty FreeType text using the <a href="http://homepages.paradise.net.nz/henryj/code/">FTGL</a> library. Follow the code below for details as always; it's really easy! :)</p>
https://demonastery.org/2011/05/org-agenda-sms-elorg-agenda to SMS2011-05-12T00:00:00-05:002011-05-12T00:00:00-05:00<p>The aim of this code is to check your <a href="http://orgmode.org">org-mode</a> agenda for any headings with DEADLINEs and create a vcalendar for each, and then send them to your phone via an SMS gateway such as <a href="http://clickatell.com">Clickatell</a>.</p>
https://demonastery.org/2011/05/more-practical-chickenMore Practical Chicken2011-05-12T00:00:00-05:002011-05-12T00:00:00-05:00<p>As I love sharing code on my blog, and I love <a href="http://call-cc.org">Chicken Scheme</a>, I'm going to share a couple of handy and practical features that I've made use of recently.</p>
https://demonastery.org/2011/04/change-gtk-display-on-the-flyChange GTK display on the fly2011-04-09T00:00:00-05:002011-04-09T00:00:00-05:00<p>Using some shared library injection it's possible to change the display of a GTK window while it's running.</p>
https://demonastery.org/2011/04/mimicking-threading-in-phpMimicking Threading in PHP2011-04-03T00:00:00-05:002011-04-03T00:00:00-05:00<p>Here's a shitty method of mimicking threads in PHP through <a href="http://en.wikipedia.org/wiki/Fork_(operating_system)">forking</a> of the PHP interpreter. You will also need to make sure that you have the <code class="language-plaintext highlighter-rouge">extension=sockets.so</code> somewhere in your <strong>php.ini</strong>.</p>
https://demonastery.org/2011/04/chicken-scheme-and-openglChicken Scheme, and OpenGL2011-04-02T00:00:00-05:002011-04-02T00:00:00-05:00<p>Today I'm posting an example of how you can quickly get started with <a href="http://en.wikipedia.org/wiki/OpenGL">OpenGL</a> using <a href="http://call-cc.org">Chicken Scheme</a>.</p>
https://demonastery.org/2011/03/acer-aspire-one-d255eAcer Aspire ONE D255E2011-03-27T00:00:00-05:002011-03-27T00:00:00-05:00<p>A week ago I went searching for a small netbook. My requirements were pretty simple; it needed to be cheap, and be able to dual boot Linux and Windows 7. Because I'm in New Zealand, the first place I checked out was <a href="http://dse.co.nz">Dick Smith Electronics</a>, which currently had a great special running on the Acer Aspire ONE D255E (<strong>$399 NZD</strong>, roughly <strong>$300 USD</strong>). Now the specs listed on the site were actually false, but the actual specs of the laptop are higher.</p>
https://demonastery.org/2011/03/a-newbie-guide-to-call-ccA Newbie Guide to Call/cc2011-03-14T00:00:00-05:002011-03-14T00:00:00-05:00<p>I haven't had much to write about in the last couple of weeks, but I've really wanted to do a small piece on the magic of <a href="http://en.wikipedia.org/wiki/Call-with-current-continuation">call-with-current-continuation</a> in Scheme, aka. <strong>call/cc</strong>.</p>
https://demonastery.org/2011/03/a-scheme-infix-transformerA Scheme Infix Transformer2011-03-08T00:00:00-06:002011-03-08T00:00:00-06:00<p>As promised in the last post, I am going to share an <a href="http://en.wikipedia.org/wiki/Infix_notation">infix</a> function, that takes a list that looks like <code class="language-plaintext highlighter-rouge">(1 + (2 * 3))</code> and turns it into <code class="language-plaintext highlighter-rouge">(+ 1 (* 2 3))</code> (<a href="http://en.wikipedia.org/wiki/Prefix_notation">Prefix</a>).</p>
https://demonastery.org/2011/03/an-intro-to-scheme-macrosAn Intro to Scheme Macros2011-03-07T00:00:00-06:002011-03-07T00:00:00-06:00<p>In this post I want to go a little deeper into the <a href="http://en.wikipedia.org/wiki/Macro_%28computer_science%29">macro</a> system of Scheme (particularly Chicken), and share a couple of macros I've created.</p>
https://demonastery.org/2011/02/quake-2-hackingQuake 2 Hacking2011-02-20T00:00:00-06:002011-02-20T00:00:00-06:00<p><a href="https://i.imgur.com/60zIh.jpg"><img src="https://i.imgur.com/60zIhm.jpg" alt="https://i.imgur.com/60zIhm.jpg" /></a></p>
https://demonastery.org/2011/01/chicken-scheme-and-ffiChicken Scheme, and FFI2011-01-31T00:00:00-06:002011-01-31T00:00:00-06:00<p>As a follow up on yesterdays post I'm going to show how easy it is to integrate some third party functionality in to a web application to provide "automatic tagging" using <a href="http://libots.sourceforge.net">libots</a>.</p>
https://demonastery.org/2011/01/chicken-scheme-and-web-radChicken Scheme, and Web RAD2011-01-30T00:00:00-06:002011-01-30T00:00:00-06:00<p>Recently I've taken more of a liking to <a href="http://call-cc.org">Chicken Scheme</a>, and started trying to use it for more of my day to day development. Recently I wrote a port (ZaneA/PongClock) of a <a href="http://www.reddit.com/r/web_design/comments/f6xff/html5js_pong_clock/">JS + HTML5 Pong Clock</a> into Chicken Scheme using the OpenGL + GLUT libraries. I couldn't believe how smoothly it went, since it was a line by line port, the only thing I needed to write myself were the graphics drawing routines, easy enough since we're only dealing with white rectangles after all, but now it functions as a cross platform screensaver (verified on Linux, OSX, and XP!).</p>
https://demonastery.org/2010/10/sawfish-and-emacs-org-modeSawfish and Emacs/org-mode2010-10-27T00:00:00-05:002010-10-27T00:00:00-05:00<p>Hi there, Today I'm going to write a small example on connecting the <a href="http://sawfish.wikia.com">Sawfish window manager</a> to the <a href="http://gnu.org/software/emacs">Emacs text editor</a>.</p>
https://demonastery.org/2010/09/scheme-to-phpScheme-to-PHP2010-09-28T00:00:00-05:002010-09-28T00:00:00-05:00<p><img src="/images/chicken.png" alt="/images/chicken.png" /></p>
https://demonastery.org/2010/07/protoircProtoIRC2010-07-09T00:00:00-05:002010-07-09T00:00:00-05:00<p>So I made a tiny and very hackable IRC bot/client base in PHP for rapid prototyping. Of course I threw it on <a href="http://github.com/ZaneA/ProtoIRC">GitHub</a>. It makes heavy use of PHP >= 5.3 closure support as well as regular expressions for defining just about everything. Basic knowledge of the IRC protocol is recommended. You can find more information in the README file in the previous link.</p>
https://demonastery.org/2010/06/misc-win32-utilitiesMisc Win32 Utilities2010-06-01T00:00:00-05:002010-06-01T00:00:00-05:00<p>Just created a new git repository on GitHub for my <a href="http://github.com/ZaneA/Win32-Hacks">Miscellaneous Win32 utilities</a>. Right now it just has my ExplorerGestures code, but I will be adding some more utilities as I find them on my hard drive.</p>
https://demonastery.org/2010/05/prepfsPrepFS2010-05-31T00:00:00-05:002010-05-31T00:00:00-05:00<p>Been a while since I posted anything here, and it's always good to have some fresh content, so I thought I'd post my latest creation PrepFS (Pre-process FS), a small utility FUSE filesystem, that enables preprocessing of files.</p>
https://demonastery.org/2010/05/mpd-class-for-phpMPD Class for PHP2010-05-31T00:00:00-05:002010-05-31T00:00:00-05:00<p>I've just been going through a couple of folders and I found a very basic PHP class I wrote to control the <a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki">Music Player Daemon</a>. Assuming the text protocol hasn't changed much it should still work fine :)</p>
https://demonastery.org/2009/10/explorergesturesExplorerGestures2009-10-03T00:00:00-05:002009-10-03T00:00:00-05:00<p>So it's <strong>2:56</strong> in the AM and I've just hacked up a little app to enable moving up a directory in Windows Explorer by using the Thunar <strong>middle click + drag up</strong> gesture. You can find it at ZaneA/Win32-Hacks.</p>
https://demonastery.org/2009/05/automatic-agenda-notificationAutomatic agenda notification2009-05-02T00:00:00-05:002009-05-02T00:00:00-05:00<p>This article will show you how to utilize Emacs org-mode, python, a Nokia mobile (others may work too), and an SMS gateway like Clickatell, in order to receive a daily agenda that fits nicely into the phones calendar by using the vCalendar format. Yes that's a fairly specialized combination, but hopefully will be useful to someone. I'm sure it's possible to do the same using bluetooth instead of and SMS gateway, and I may update this to reflect that at some stage..</p>
https://demonastery.org/2009/04/i-can-haz-assemblyI can haz assembly!2009-04-20T00:00:00-05:002009-04-20T00:00:00-05:00<p>Simple CPUID, I also experimented with a version using an extra buffer variable and <code class="language-plaintext highlighter-rouge">printf</code>.
It may not be much to others but I'm learning!</p>
https://demonastery.org/2009/03/a-simple-wallpaper-wrapperA simple wallpaper wrapper2009-03-13T00:00:00-05:002009-03-13T00:00:00-05:00<p>Edit as necessary, requires hsetroot, mplayer, and a working xvidix on your graphics card (for video).</p>
https://demonastery.org/2009/02/change-fonts-dynamicallyChange fonts dynamically2009-02-18T00:00:00-06:002009-02-18T00:00:00-06:00<p>After some Q and A on the ArchLinux forums, I am left with this in my .zshrc, the ability to change fonts on the fly:</p>