This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# see: https://gist.github.com/gregorynicholas/2160046ec6946a2ce0fa | |
# src: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# updated: 2015-06-06 | |
# | |
# ask for the administrator password upfront | |
sudo -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script by RuiMac - 09-2015 | |
import c4d | |
from c4d import gui | |
#Welcome to the world of Python | |
def replace(obj,m1,m2): | |
# while there are still objects... | |
while obj: | |
# get all the tags of the object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: ascii -*- | |
#: see: https://github.com/dasmith/stanford-corenlp-python/blob/master/jsonrpc.py | |
""" | |
JSON-RPC (remote procedure call). | |
It consists of 3 (independent) parts: | |
- proxy/dispatcher | |
- data structure / serializer | |
- transport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Heads to github fetches milestone info, and adds rows to spreadsheet | |
*/ | |
function updateBugCounts() { | |
var resp = UrlFetchApp.fetch("https://api.github.com/repos/DramaFever/www/milestones?access_token=XXX"); | |
var jsonStr = resp.getContentText(); | |
var milestones = Utilities.jsonParse(jsonStr); | |
var dataSs = SpreadsheetApp.openById("YYY"); | |
var sheet = dataSs.getSheetByName('Raw Data'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Returns a PDF object based on the contents of the 'invoicing' sheet */ | |
function invoiceToPDF(invDetails) | |
{ | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
ssID = spreadsheet.getId(); | |
var sheet = spreadsheet.getSheetByName(INVOICES_SHEETNAME); | |
var gid = sheet.getSheetId(); | |
// &gid=x at the end of above url if you only want a particular sheet | |
var url2 = "http://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=" + ssID + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Emera's UAC (Universal Admin Commands) | |
Version 1.3 | |
*/ | |
function onCreated() { | |
this.admins = { | |
"Graal808129", //Emera | |
"Person1", | |
"Person2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pprint_doc(doc, level=1): | |
'''Pretty prints a `mongoengine.Document`.''' | |
body = ['<', type(doc).__name__, ':'] | |
# for field in sorted(doc._fields, key=lambda f: f.number): | |
for key, field in doc._fields.iteritems(): | |
value = doc[key] | |
if value is not None: | |
body.append('\n%s%s: %s' % (' '.join([' ' for idx in range(level)]), key, repr(value))) | |
body.append('>') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: UTF-8 | |
''' | |
Setup apc mini colors without Ablton Live | |
---------- | |
> brew install portmidi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sysctl kern.maxfiles | |
#kern.maxfiles: 12288 | |
sysctl kern.maxfilesperproc | |
#kern.maxfilesperproc: 10240 | |
sudo sysctl -w kern.maxfiles=1048600 | |
#kern.maxfiles: 12288 -> 1048600 | |
sudo sysctl -w kern.maxfilesperproc=1048576 | |
#kern.maxfilesperproc: 10240 -> 1048576 | |
sudo sysctl -w net.inet.tcp.rfc1323=1 |
NewerOlder