Skip to content

Instantly share code, notes, and snippets.

View booyaa's full-sized avatar
🏠
Working from home forevah!

Mark Sta Ana booyaa

🏠
Working from home forevah!
View GitHub Profile
@whatupdave
whatupdave / check.sh
Created March 4, 2013 20:53
Text me when Mojang updates the Minecraft server
#!/bin/bash
old_etag=$(curl --silent http://api.openkeyval.org/minecraft-etag)
new_etag=$(curl --silent --head https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar | grep ETag | awk -F\" '{print $2}')
if [ $old_etag != $new_etag ]; then
echo "event=updated old=$old_etag new=$new_etag"
curl --silent -X POST https://api.twilio.com/2010-04-01/Accounts/$TWILIO_USER/SMS/Messages.json \
-u $TWILIO_USER:$TWILIO_PASS \
-d "From=$SMS_FROM" \
@macodev
macodev / gist:4985042
Created February 19, 2013 11:31
Mac OSX custom keybindings in ˜/Library/KeyBindings/DefaultKeyBinding.dict for IT keyboard
{
/* Custom Key Bindings */
"§" = ("insertText:", "}");
"°" = ("inesertText:", "{");
"ç" = ("insertText:", "#");
}
@pvdissel
pvdissel / .tmux.conf
Created February 18, 2013 08:58
My tmux config
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
# Setting the delay between prefix and command
set -s escape-time 1
# Ensure that we can send Ctrl-A to other apps
@creationix
creationix / parallelclient.js
Created February 1, 2013 22:39
test to show that client agent throttles to 5 connections by default.
var http = require('http');
var count = 0;
function get() {
var i = count++;
console.log("Starting request #" + i);
var req = http.request({
hostname: "localhost",
port: 8080,
@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@christianberg
christianberg / .tmux.conf
Created January 25, 2013 14:23
tmux config
set -g bell-action any
set -g default-terminal xterm
set -g display-panes-colour red
set -g message-bg cyan
set -g message-fg white
set -g mouse-select-pane on
set -g pane-border-bg default
set -g pane-border-fg cyan
set -g pane-active-border-bg default
set -g pane-active-border-fg white
@cormacrelf
cormacrelf / OpenURL.py
Created January 20, 2013 13:35
open url in safari from pythonista
# a bit of a hack
# by Cormac Relf - cormacrelf.com - @cormacrelf
# Opens the url on the clipboard in Safari
# by opening Google Chrome with an x-callback-url
# that takes you to the same url in Safari.
# I guess you could just open it in googlechrome://
import webbrowser
@laurilehmijoki
laurilehmijoki / gist:4492781
Created January 9, 2013 12:28
OS X key repeat
# For inspiration, see http://mths.be/osx
# Set a shorter Delay until key repeat (requires OS restart to take effect)
defaults write NSGlobalDomain InitialKeyRepeat -int 12
# Set a blazingly fast keyboard repeat rate (requires OS restart to take effect)
defaults write NSGlobalDomain KeyRepeat -int 0.02
defaults write com.apple.finder AppleShowAllFiles TRUE
# Disable the “Are you sure you want to open this application?” dialog
@zakkak
zakkak / SSHFS
Last active December 10, 2015 21:08
Notes on how to add an sshfs folder to fstab
/etc/fstab
==========
`sshfs#[email protected]:/home/myname /mnt/sshfs/homebox fuse comment=sshfs,noauto,users,exec,workaround=rename,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,BatchMode=yes 0 0`
/etc/fuse.conf
==============
`user_allow_other`
umount
======
# Install a sane Ruby Version Manager along with Recent Ruby
\curl -L https://get.rvm.io | bash -s stable --ruby
# Source the installed script to allow for using RVM this first time
# Future logins will automatically source RVM using your bashrc or zshrc
source ~/.rvm/scripts/rvm
# Clone Trello-Archiver
git clone https://github.com/zph/trello-archiver.git
# Move into folder
cd trello-archiver/
# Install needed Ruby Gem dependencies