Skip to content

Instantly share code, notes, and snippets.

View himynameisjonas's full-sized avatar

Jonas Brusman himynameisjonas

View GitHub Profile

Keybase proof

I hereby claim:

  • I am himynameisjonas on github.
  • I am himynameisjonas (https://keybase.io/himynameisjonas) on keybase.
  • I have a public key whose fingerprint is 4BFE 628F FB40 778D 5A0C 173F 84BF A7FA FB67 1574

To claim this, I am signing this object:

@himynameisjonas
himynameisjonas / add ssh host shortcuts.txt
Created February 5, 2010 08:55
add ssh host shortcuts
Another tip here is editing the ssh config file.
On your machine (not the iphone), create ~/.ssh/config
In there, add the following lines
Host iphone
HostName 10.0.1.1
User root
@himynameisjonas
himynameisjonas / Recursively Remove .DS_Store files in OS X
Created May 18, 2010 13:54
Recursively Remove .DS_Store files in OS X
find.-name*.DS_Store-typef-execrm{} \;
för att skapa en tunnel från port 2222 till port 22 på en annan maskin:
Kod:
ssh -fNT -L 2222:localhost:22 user@192.0.2.1
För att förtydliga, om du då ansluter till localhost port 2222 så kommer du hamna på 192.0.2.1 port 22 och få en inloggningspromt från ssh daemonen på den maskinen..
@himynameisjonas
himynameisjonas / start & stop crashplan osx
Created May 18, 2010 13:56
start & stop crashplan osx
#To stop, enter the following command:
sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist
#To start (load):
sudo launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist
@himynameisjonas
himynameisjonas / post-checkout
Created January 11, 2011 20:59
post-checkout git-hook
#!/bin/bash
oldrev="$1"
newrev="$2"
if [[ $3 == "1" ]]; then
diffresult=$(git diff "$oldrev" "$newrev" -- .rvmrc)
if [[ $diffresult != "" ]]; then
msg=" \n Don't forget to reload your .rvmrc! \n "
echo -e "\033[41;37m$msg\033[0m"
fi
@himynameisjonas
himynameisjonas / gist:1001931
Created June 1, 2011 07:35
HTTP Client bug
# Response body from curl
{"hit":{"author_id":40,"date":"2011-05-31T15:06:47Z","extract":"<a href=\"http://twitter.com/DanWarp\">@DanWarp</a> I&apos;m so excited!!!!! It&apos;s going to be <b>awesome</b>(;","profile_id":1,"source_name":null,"starred":false,"title":"@DanWarp I'm so excited!!!!! It's going to be awesome(;","url":"http://twitter.com/SparksFlyyXx/statuses/75578980698304512","uri":"/accounts/1/profiles/1/hits/32825","hit_type":"tweet"}}
# Response body in HTTP Client
<"hit":{"author_id":40,"date":"2011-05-31T15:06:47Z","extract":"<a href=\"http://twitter.com/DanWarp\">@DanWarp</a> I&apos;m so excited!!!!! It&apos;s going to be <b>awesome</b>
@himynameisjonas
himynameisjonas / gist:1253287
Created September 30, 2011 09:45
960 grid bookmarklet
javascript:(function(){var%20jqLoader={go:function(){if(!(window.jQuery&&window.jQuery.fn.jquery=='1.3.2')){var%20s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');s.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(s)}this.ok()},ok:function(){if(typeof(window.jQuery)!=='undefined'&&window.jQuery.fn.jquery=='1.3.2'){this.init()}else{setTimeout((function(){jqLoader.ok()}),100)}},init:function(){$.getScript('http://www.badlydrawntoy.com/static/960grid/js/jquery.960grid.bk-1.0.min.js',function(){$('body').addGrid(12)})}};jqLoader.go()})();
<script type="text/javascript">
var _trackr_config={domain:"google.com"};
(function(){
function loadChartbeat() {
window._sf_endpt=(new Date()).getTime();
var e = document.createElement('script');
e.setAttribute('src',"//localhost:3000/trackr-local.js");
document.body.appendChild(e);
}
var oldonload = window.onload;
@himynameisjonas
himynameisjonas / gist:3736116
Created September 17, 2012 08:05 — forked from jasoncodes/gist:1223731
Installing Ruby 1.9.3 with rbenv
brew install rbenv
brew install ruby-build
brew install rbenv-vars
brew install readline
brew install ctags
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
exec $SHELL -i # reload the shell
CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.3-p194
rbenv global 1.9.3-p194
gem install bundler rbenv-rehash git-up hitch gem-browse gem-ctags cheat awesome_print pry