Skip to content

Instantly share code, notes, and snippets.

@CraigCottingham
CraigCottingham / readme.txt
Last active Apr 3, 2021 — forked from rkttu/readme.txt
Ubuntu 20.10 + WSL 2 + XRDP PulseAudio
View readme.txt
# Credits
# https://c-nergy.be/blog/?p=13655
# https://askubuntu.com/questions/844245/how-to-compile-latest-pulseaudio-with-webrtc-in-ubuntu-16-04
# https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list
# https://unix.stackexchange.com/questions/65167/enable-udev-and-speex-support-for-pulseaudio
# https://rudd-o.com/linux-and-free-software/how-to-make-pulseaudio-run-once-at-boot-for-all-your-users
# https://gist.github.com/rkttu/35ecab5604c9ddc356b0af4644d5a226
# First, you should install XRDP and X11 Desktop Environment first.
View gist:c81524c2f556f250f8acd836c19ef853
BEGIN MESSAGE.
tQ0zRTmAw7HlgAp P2ckMdfo74cefQZ qTzEOOceHhsx2sj Tpcyq7bxC4QinR9
sd6wG67qhzvFjdC P0r2MaoDIOxTCKq 6Xr2MZHgg77MRsU 6OyGyGKyOp2tsiD
VXx1gotQVCQUeKM 80htpFhMi1i6EgX AvkGGEXxeSSnr1n QIrvjIKQeWHPP2C
hbNnz2XpagcvA6s YyRkUrIkm3Gq4ip 2JfDm1N5kVsSvb2 JIGj.
END MESSAGE.
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.
View keybase.md

Keybase proof

I hereby claim:

  • I am CraigCottingham on github.
  • I am craigcottingham (https://keybase.io/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
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://CraigCottingham@github.com/CraigCottingham/kitchenplan.git
fetch = +refs/heads/*:refs/remotes/origin/*
@CraigCottingham
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 http://jruby.org.s3.amazonaws.com/downloads/1.7.8/jruby-bin-1.7.8.tar.gz
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
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}'"
else
@from = "pg_dump -Fc -c -O -v -- #{@from_spec}"
end
@CraigCottingham
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 = []
init_var
end
def size_of_var
@var.size
end
end
@CraigCottingham
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
/LookupMutualFunds.do?symbolField=symbol&nameField="><script>alert(13323542.3157)</script>