Category: Uncategorized

  • Programmatic CAD, OpenSCAD alternatives

    There are quite a few programatic CAD, OpenSCAD alternatives out there. I am collecting a list of them and providing links to them here. The requirements to be included in this list are: Free and libre. They are a programming language as opposed to a GUI. OpenSCAD: The most well known programmatic CAD program. Probably…

  • Emacs: yank a line multiple times from the kill ring

    Emacs: yank a line multiple times from the kill ring

    Today I needed to copy a line multiple times in emacs. I needed 8 copies, but how to do that in emacs short of pressing C-y to yank 8 times? My initial guess was to try C-u 8 C-y but that yanks the 8th item from the kill ring. Fuco on #emacs supplied the awesome…

  • Setting alternate hreflang in WordPress

    UPDATE 2013-05-03: After writing this I found out my approach was incorrect. I have since removed the code as it was not useful. Dan’s team was kind enough to point me to Virgin Australia‘s site. If you inspect the source and search for hreflang, you’ll see how it should be done. /UPDATE After seeing the…

  • There will be Emacs Chocolate at the #Emacs Meetup Melbourne

    I decided to make something special for the inaugural Australian emacs meetup. If you want some, come to the Melbourne emacs meetup. Sofia’s Camberwell. 857 Burke Road Camberwell 3124 Victoria, Australia Friday April 26, 2013 6:00 PM

  • Launching cygwin emacs from native win32 programs

    My business’s accounting program, which I’ll call Canopus, has issues. One of which is that it assumes wordpad.exe will be in c:\windows. As far as I know, Microsoft moved wordpad.exe’s default location away from c:\windows about 20 years ago. Canopus live in hope that it will be there so installing Canopus always requires one to…

  • Project Euler No. 2 in Emacs elisp

    My second Project Euler solution. Project Euler No. 2 This was a little tougher to solve than No. 1. I decided to use recursion to solve it, and as I haven’t had to write anything that used recursion since I was at Uni, it took me a while go remember how to do it. Also,…

  • Install perl modules automatically using lib::xi

    So you’ve downloaded a really cool perl script but it has 200 module dependencies? You could just install them one by one with cpanm or, you could use lib::xi. It automatically installs modules your perl script uses. # to install missing libaries automatically $ perl -Mlib::xi script.pl

  • OAuth 2.0 in emacs – Part 4

    Finally managed to authenticate against WordPress.com using the oauth2 library. Here is my sample code which returns an access token. (let ((code (oauth2-request-authorization “https://public-api.wordpress.com/oauth2/authorize?blog=jasonblewis.wordpress.com” “2194” “” “” “https://emacstragic.net”) )) (oauth2-request-access “https://public-api.wordpress.com/oauth2/token” “2194” “” code “https://emacstragic.net” ) ) WordPress at least seems to be fussy about what you use as the Redirect URI. It needs to…

  • Project Euler No. 1 in Emacs elisp

    My first Project Euler solution, and my first emacs elisp program. Multiples of 3 and 5. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3…

  • emacs elisp first attempts

    For a long time I have wanted to learn elisp in emacs. I tried the various tutorials but I get bored of them too quickly. Too many words not enough action for me. I was reminded of Project Euler by Daniel Silverstone so I thought I’d have a crack at one of the problems. No.…