Skip to content

Instantly share code, notes, and snippets.

@ryanmjacobs
ryanmjacobs / README.md
Last active August 29, 2015 14:14
Download all xkcd comics.
$ git clone https://gist.github.com/ryanmjacobs/50a7944e929c1329ad44 xkcd
$ cd xkcd
$ gem install colorize
$ chmod +x xkcd.rb
$ ./xkcd.rb

Some extra info if you're curious:

  • git clone ... xkcd grabs these files and puts them in a directory called xkcd.
@ryanmjacobs
ryanmjacobs / .gitignore
Last active September 10, 2015 06:55
Simulate Rubik's Cubes using the two-cycle method.
.*.sw[op]
*.pdf
*.json
*.csv
#!/usr/bin/env node
/**
* sort_ip.js
*
* run with: 'node ./sort_ip.js'
*/
// compare function
var compare = function(a, b) {
var aa = a.split("."),
@ryanmjacobs
ryanmjacobs / permutations.sh
Last active May 19, 2021 12:09
displays all upper/lowercase permutations of a word
#!/bin/bash
str=${1^^} # convert to uppercase
len=${#str} # get length of string
for ((perm=0; perm <= len; perm++)); do
for ((i=0; i <= len; i++)); do
lower=${str,,} # convert to lowercase
# Uppercase n-th letter for permutation
@ryanmjacobs
ryanmjacobs / PKGBUILD
Last active August 29, 2015 14:05
naken_asm 2014-07-05 PKGBUILD
# Author: mr1337357 <[email protected]>
# Author: ryanjacobs <[email protected]>
pkgname=naken_asm
pkgver=2014.07.05
pkgrel=1
pkgdesc="A raw, simple assembler supporting 65xx, ARM, dsPIC, MIPS, 8051/8052, and MSP430 instruction sets"
arch=('i686' 'x86_64' 'arm')
url="http://www.mikekohn.net/micro/naken_asm.php"
license=('GPL')
depends=('readline')
@ryanmjacobs
ryanmjacobs / PKGBUILD
Created August 29, 2014 04:40
Orpie PKGBUILD - Aug. 28, 2014
# Contributor: Kazuo Teramoto <kaz.rag gmail com>
# Contributor: scj <scj archlinux us>
# Contributor: tracer <jcdenton513 gmail com>
# Contributor: ryanjacobs <ryan.mjacobs gmail com>
# Maintainer: aksr <aksr at t-com dot me>
pkgname=orpie
pkgver=1.5.2
pkgrel=7
epoch=
pkgdesc="A console-based RPN (reverse polish notation) desktop calculator."