Skip to content

Instantly share code, notes, and snippets.

View codabrink's full-sized avatar

Dakota Brink codabrink

View GitHub Profile
@codabrink
codabrink / keyboard.ahk
Last active November 4, 2019 17:54
Unix / Mac OSX / Emacs like keys in Windows
#NoEnv
#SingleInstance force
SendMode Input
SetWorkingDir %A_ScriptDir%
; unix-like keyboard in windows
<^n::
Send {Down}
return
<^p::

Keybase proof

I hereby claim:

  • I am codabrink on github.
  • I am sodacode (https://keybase.io/sodacode) on keybase.
  • I have a public key whose fingerprint is 1FC2 9A3B FFC0 2356 2FA1 768C DE24 17C9 AFC1 E729

To claim this, I am signing this object:

@codabrink
codabrink / Paraglider.lua
Last active April 29, 2018 01:19
FarCry, Farcry1 Multiplayer Paraglider Script, Paraglider.lua (works with multiplayer phoenix)
Paraglider = {
bNoImpuls=1,
bParaglider=1,
CanShoot = 1, -- player can shoot from his veapon while driving this vehicle -
-- don't change action map to vehicle when entering
@codabrink
codabrink / s3upload
Last active August 29, 2015 14:27
Upload files to s3 on Mac via command line
#!/bin/bash
BUCKET_NAME=coda-files
NEW_NAME=`openssl rand -base64 6`
EXTENSION="${1#*.}"
s3cmd -P put $1 s3://$BUCKET_NAME/$NEW_NAME.$EXTENSION
echo "https://s3.amazonaws.com/$BUCKET_NAME/$NEW_NAME.$EXTENSION" | pbcopy
afplay /System/Library/Sounds/Hero.aiff
*italic*
**bold**
_underlined_
var str = "fun times!";
var newStr = '';
function isLetter(c) { return (c > 100 && c < 133 || c > 140 && c < 173); }
for (var i = 0; i < str.length; i++) {
var char_code = str.charCodeAt(i);
if (char_code === 122)
char_code = 97; // convert z to a
else if (char_code === 90)
rm app/sites/$1/theme.scss
git checkout $(git rev-list -n 1 HEAD -- "app/sites/$1/_theme_colors.scss")^ -- "app/sites/$1/_theme_colors.scss"
git checkout $(git rev-list -n 1 HEAD -- "app/sites/$1/_site_colors.scss")^ -- "app/sites/$1/_site_colors.scss"
git checkout $(git rev-list -n 1 HEAD -- "app/sites/$1/site.scss")^ -- "app/sites/$1/site.scss"
rake zl:tmwland:convert_wl[$1]
while [ ! -f tmp/rake_done ]
do
sleep 1s
var response_spy = sinon.spy();
$(document).on("recipes.response_details", response_spy);
$(document).trigger("recipes.request_details", { guid: "123"});
// Now there should be a pending AJAX request to the server.
var req = this.last_xhr_request();
// You can inspect it ot make sure it's going to the right URL, etc. (look at other tests).
@codabrink
codabrink / gist:3699262
Created September 11, 2012 14:44
create_options error
rake aborted!
undefined local variable or method `creation_options' for main:Object
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/railties/databases.rake:88:in `rescue in rescue in create_database'
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/railties/databases.rake:75:in `rescue in create_database'
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/railties/databases.rake:45:in `create_database'
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/railties/databases.rake:33:in `block (2 levels) in <top (required)>'
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/DBRINK/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2.2/
@codabrink
codabrink / gist:3692763
Created September 10, 2012 18:31
bundling
Using image_science (1.3.2.1.Asynchrony) from https://github.com/asynchrony/image_science.git (at v1.3.2.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/DBRINK/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
checking for main() in -lfreeimage... no
creating Makefile
make
gcc-4.2 -I. -I/Users/DBRINK/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/x86_64-darwin12.1.0 -I/Users/DBRINK/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/ruby/backward -I/Users/DBRINK/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1 -I. -I/usr/local/include -I/usr/include -I/Users/DBRINK/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o image_science.o -c image_science.c
image_science.c:2:23: error: FreeImage.h: No such file or directory