Skip to content

Instantly share code, notes, and snippets.

CraigCottingham / readme.txt
Last active Jul 20, 2021 — forked from rkttu/readme.txt
Ubuntu 20.10 + WSL 2 + XRDP PulseAudio
View readme.txt
# Credits
# First, you should install XRDP and X11 Desktop Environment first.
View gist:c81524c2f556f250f8acd836c19ef853
tQ0zRTmAw7HlgAp P2ckMdfo74cefQZ qTzEOOceHhsx2sj Tpcyq7bxC4QinR9
sd6wG67qhzvFjdC P0r2MaoDIOxTCKq 6Xr2MZHgg77MRsU 6OyGyGKyOp2tsiD
VXx1gotQVCQUeKM 80htpFhMi1i6EgX AvkGGEXxeSSnr1n QIrvjIKQeWHPP2C
hbNnz2XpagcvA6s YyRkUrIkm3Gq4ip 2JfDm1N5kVsSvb2 JIGj.
View UpsideDownLEDs Prototype_bb.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am CraigCottingham on github.
  • I am craigcottingham ( on keybase.
  • I have a public key whose fingerprint is 65B6 E2C1 FFFD C79A C2D7 651B 7FD2 D2D2 EE38 B33F

To claim this, I am signing this object:

View .git-config
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url =
fetch = +refs/heads/*:refs/remotes/origin/*
CraigCottingham / gist:7810070
Last active Dec 30, 2015
Output of running `rvm install jruby`
View gist:7810070
Searching for binary rubies, this might take some time.
Found remote file
Checking requirements for osx.
Requirements installation successful.
jruby-1.7.8 - #configure
jruby-1.7.8 - #download
jruby-1.7.8 - #validate archive
jruby-1.7.8 - #extract
jruby-1.7.8 - #validate binary
jruby-1.7.8 - #setup
CraigCottingham / gist:7271927
Created Nov 1, 2013
Usage: pg_copy (source database name) (destination database name)
View gist:7271927
#!/usr/bin/env ruby -wKU
(@from_spec, @to_spec) = ARGV
if @from_spec.match(/^([^:]+):(.+)$/) { | md | @from_server = md[1]; @from_db = md[2] }
@from = "ssh #{@from_server} 'pg_dump -Fc -c -O -v -- #{@from_db}'"
@from = "pg_dump -Fc -c -O -v -- #{@from_spec}"
CraigCottingham / base.rb
Last active Dec 11, 2015
Just how wrong is this? It works, but it feels dirty to call a method on the child class when it's not fully initialized yet.
View base.rb
class Base
def initialize
@var = []
def size_of_var
CraigCottingham / gist:3918748
Created Oct 19, 2012
Error trying to install ruby-1.9.3-p286 via RVM
View gist:3918748
[2012-10-19 09:58:27] make install
./miniruby -I./lib -I. -I.ext/common ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
installing binary commands: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/bin
installing base libraries: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/lib
installing arch files: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/x86_64-darwin12.2.0
installing pkgconfig data: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/lib/pkgconfig
installing command scripts: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/bin
installing library scripts: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1
installing common headers: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/include/ruby-1.9.1
installing manpages: /Users/craigc/.rvm/rubies/ruby-1.9.3-p286/share/man/man1
View gist:2230312