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
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@jfautley
jfautley / gist:3945009
Created October 24, 2012 09:13 — forked from mdengler/gist:3944990
fixperms.sh
awk -F: '($3 >= 1000) { printf("%s:%s:%s:%s\n", $1, $3, $4, $6) }' /etc/passwd | while read line; do
UNAME=$(echo $line | cut -d: -f1)
USERID=$(echo $line | cut -d: -f2)
GRPID=$(echo $line | cut -d: -f3)
HMDIR=$(echo $line | cut -d: -f4)
echo "Changing user [$UNAME] with home [$HMDIR] to [$USERID:$GRPID]"
#chown -R $USERID:$GRPID $HMDIR
done
@ekashida
ekashida / trello-poller.js
Created November 2, 2012 17:11
trello progress poller for google drive spreadsheets
/*global UrlFetchApp:true,Utilities:true,SpreadsheetApp:true*/
var KEY = <API_KEY>,
TOKEN = <TOKEN>,
BOARD = <BOARD_ID>,
BLACKLIST_RE = /stories/i; // list column names to ignore using regex alternation
function trelloFetch(request) {
'use strict';
var url = 'https://api.trello.com/1/' + request + '?key=' + KEY + '&token=' + TOKEN,
@amatsuda
amatsuda / gist:4158531
Created November 28, 2012 01:44
headers, cookies, and params usage in my controllers
% rake stats
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 4327 | 3478 | 110 | 361 | 3 | 7 |
| Helpers | 384 | 331 | 0 | 35 | 0 | 7 |
| Models | 2912 | 2177 | 84 | 226 | 2 | 7 |
| Libraries | 281 | 230 | 8 | 39 | 4 | 3 |
| Model specs | 3096 | 2663 | 0 | 0 | 0 | 0 |
| Controller specs | 1005 | 783 | 0 | 3 | 0 | 259 |
@xtender
xtender / gist:4374641
Created December 25, 2012 18:24
Simple example for returning columns from column position #M to #N
with t_cols_M_to_N as (
select
x1.n
,x2.*
from
xmltable( 'for $r in /ROWSET/*
return $r'
passing
dbms_xmlgen.getxmltype(
-- you can change query here:
# 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
@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
======
@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
@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