sudo dseditgroup -o edit -a USERNAME -t user GROUPNAME
defaults write com.google.GmailNotifier AutocheckInterval EVERY_N_MINUTES
defaults delete com.google.GmailNotifier AutocheckInterval # to reset
#!/usr/bin/env bash | |
function print_help { | |
echo "Display the week's agenda from Google Calendar." | |
echo "Usage: $(basename $0) [options]" | |
echo " -h Show this usage guide." | |
echo " -t Today's agenda." | |
echo " -m Month agenda." | |
echo " -E Only display Event calendar." | |
echo "[Add event]" |
/* | |
SublimeLinter default settings | |
*/ | |
{ | |
/* | |
Sets the mode in which SublimeLinter runs: | |
true - Linting occurs in the background as you type (the default). | |
false - Linting only occurs when you initiate it. | |
"load-save" - Linting occurs only when a file is loaded and saved. |
import glob, subprocess | |
f = open('tally_out.txt', 'w') | |
base = "/Users/ivar/Pictures/" | |
directories = glob.glob(base+"11*.*"); | |
def doStuff(file): | |
exifoutput = subprocess.check_output(["exiftool","-fast","-LensModel","-FocalLength","-Aperture","-FocusDistanceLower",file]) | |
exifoutput = exifoutput.split("\n") |
#!/bin/sh | |
# From Gerrit Code Review 2.1.6.1 | |
# | |
# Part of Gerrit Code Review (http://code.google.com/p/gerrit/) | |
# | |
# Copyright (C) 2009 The Android Open Source Project | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
DO WTF YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Alexey Silin <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WTF YOU WANT TO PUBLIC LICENSE |
Function.prototype.bind=Function.prototype.bind||function(b){if(typeof this!=="function"){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");}var a=Array.prototype.slice,f=a.call(arguments,1),e=this,c=function(){},d=function(){return e.apply(this instanceof c?this:b||window,f.concat(a.call(arguments)));};c.prototype=this.prototype;d.prototype=new c();return d;}; |
function sendData(url, data, onSuccess, onError) { | |
$.ajax({ | |
url: url, | |
type: 'POST', | |
data: data, | |
dataType: 'json', | |
xhrFields: { | |
withCredentials: true | |
}, |
#!/opt/local/bin/python2.7 | |
# encoding: utf-8 | |
""" | |
couchimport.py | |
Created by Marian Steinbach on 2011-11-10. | |
""" | |
import sys | |
import os | |
import datetime |
sudo dseditgroup -o edit -a USERNAME -t user GROUPNAME
defaults write com.google.GmailNotifier AutocheckInterval EVERY_N_MINUTES
defaults delete com.google.GmailNotifier AutocheckInterval # to reset
import functools | |
import logging | |
from google.appengine.api import memcache | |
def cached(time=1200): | |
""" | |
Decorator that caches the result of a method for the specified time in seconds. | |
Use it as: | |