Skip to content

Instantly share code, notes, and snippets.

View krisalyssa's full-sized avatar

Kris Cottingham krisalyssa

View GitHub Profile
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
var reduce_1 = __importDefault(require("lodash/reduce"));
function testReduction() {
var tempArray = [
{ a: 'foo', b: 'bar' },
{ a: 'baz', b: 'quux' }
@krisalyssa
krisalyssa / readme.txt
Last active September 12, 2022 20:31 — forked from rkttu/readme.txt
Ubuntu 20.10 + WSL 2 + XRDP PulseAudio
# 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.
BEGIN MESSAGE.
tQ0zRTmAw7HlgAp P2ckMdfo74cefQZ qTzEOOceHhsx2sj Tpcyq7bxC4QinR9
sd6wG67qhzvFjdC P0r2MaoDIOxTCKq 6Xr2MZHgg77MRsU 6OyGyGKyOp2tsiD
VXx1gotQVCQUeKM 80htpFhMi1i6EgX AvkGGEXxeSSnr1n QIrvjIKQeWHPP2C
hbNnz2XpagcvA6s YyRkUrIkm3Gq4ip 2JfDm1N5kVsSvb2 JIGj.
END MESSAGE.
@krisalyssa
krisalyssa / UpsideDownLEDs Prototype_bb.svg
Created November 18, 2016 20:27
UpsideDownLEDs images
Loading
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 (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:

[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/*
@krisalyssa
krisalyssa / gist:7810070
Last active December 30, 2015 09:29
Output of running `rvm install jruby`
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
@krisalyssa
krisalyssa / gist:7271927
Created November 1, 2013 21:04
Usage: pg_copy (source database name) (destination database name)
#!/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
@krisalyssa
krisalyssa / base.rb
Last active December 11, 2015 03:48
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.
class Base
def initialize
@var = []
init_var
end
def size_of_var
@var.size
end
end
@krisalyssa
krisalyssa / gist:3918748
Created October 19, 2012 15:12
Error trying to install ruby-1.9.3-p286 via RVM
[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