Skip to content

Instantly share code, notes, and snippets.

View durdn's full-sized avatar

Nicola Paolucci durdn

View GitHub Profile
### Keybase proof
I hereby claim:
* I am durdn on github.
* I am durdn (https://keybase.io/durdn) on keybase.
* I have a public key whose fingerprint is 40A8 1B77 B5DA ACAD 194B 6B04 0873 7362 FC1D 757D
To claim this, I am signing this object:
@durdn
durdn / fresh-osx-mountain-lion-setup.md
Created December 15, 2012 17:47
Fresh OSX Mountain Lion setup
  • software update

  • hide finder

  • install homebrew:

    ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

  • Run brew doctor:

    brew doctor

@durdn
durdn / nginx.conf
Created May 12, 2012 16:17
Upstart Configuration for nginx
# nginx
description "nginx http daemon"
author "George Shammas <georgyo@gmail.com>"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON="/data/apps/nginx/sbin/nginx -c /data/apps/nginx/conf/nginx.conf"
env PID=/var/run/nginx.pid
@durdn
durdn / freshbook-mindcurv-timesheet.user.css
Created April 23, 2012 14:52
Freshbook Mindcurv Timesheet CSS
body {
color : red
}
.tabArea {
background-color : white;
background-image : none;
background-repeat : none;
border : none;
}
@durdn
durdn / freshbook-mindcurv-timesheet.user.js
Created April 20, 2012 15:26
Freshbook Mindcurv Timesheet Beautifier
// ==UserScript==
// @name freshbook-mindcurv-timesheet
// @namespace http://userscript.org/durdn
// @include https://mindcurv.freshbooks.com/*
// ==/UserScript==
(function(a){String.prototype.trim===a&&(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Array.prototype.reduce===a&&(Array.prototype.reduce=function(b){if(this===void 0||this===null)throw new TypeError;var c=Object(this),d=c.length>>>0,e=0,f;if(typeof b!="function")throw new TypeError;if(d==0&&arguments.length==1)throw new TypeError;if(arguments.length>=2)f=arguments[1];else do{if(e in c){f=c[e++];break}if(++e>=d)throw new TypeError}while(!0);while(e<d)e in c&&(f=b.call(a,f,c[e],e,c)),e++;return f})})();var Zepto=function(){function v(a){return{}.toString.call(a)=="[object Function]"}function w(a){return a instanceof Object}function x(a){return a instanceof Array}function y(a){return typeof a.length=="number"}function z(b){return b.filter(function(b){return b!==a&&b!==null})}function A(a){r
@durdn
durdn / custom.conf
Created March 5, 2012 12:05
autologin on xubuntu, ubuntu, linux
Try this edit:
$ cat /etc/gdm/custom.conf
[daemon]
TimedLoginEnable=false
AutomaticLoginEnable=true
TimedLogin=user_You_want_to_login
AutomaticLogin=user_You_want_to_login
TimedLoginDelay=30
@durdn
durdn / salvatore.user.js
Created February 29, 2012 22:40
clarity-for-salvatore
// ==UserScript==
// @name clarity-for-salvatore
// @namespace http://durdn.com/clarity-for-salvatore
// @include http://www.salvatorebrizzi.com/*
// ==/UserScript==
(function(a){String.prototype.trim===a&&(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Array.prototype.reduce===a&&(Array.prototype.reduce=function(b){if(this===void 0||this===null)throw new TypeError;var c=Object(this),d=c.length>>>0,e=0,f;if(typeof b!="function")throw new TypeError;if(d==0&&arguments.length==1)throw new TypeError;if(arguments.length>=2)f=arguments[1];else do{if(e in c){f=c[e++];break}if(++e>=d)throw new TypeError}while(!0);while(e<d)e in c&&(f=b.call(a,f,c[e],e,c)),e++;return f})})();var Zepto=function(){function v(a){return{}.toString.call(a)=="[object Function]"}function w(a){return a instanceof Object}function x(a){return a instanceof Array}function y(a){return typeof a.length=="number"}function z(b){return b.filter(function(b){return b!==a&&b!==null})}function A(a
@durdn
durdn / tuttivisti-test.py
Created June 14, 2010 07:42
sample tuttivisti API calls
from django.test.client import Client
from simplejson import loads
import movies.views
import movies.tests
from movies.models import *
from django.contrib.auth.models import User
class TestAPI(unittest.TestCase):
def setUp(self):
@durdn
durdn / tests.py
Created June 7, 2010 14:43
tests.py
from StringIO import StringIO
from datetime import datetime
from django.test import TestCase
import settings
from tms.parser import TMSParser, TMSAuthorParser
from tms.query import QueryProcessor
from collectie.collections.models import TMSObject
@durdn
durdn / parser.py
Created June 7, 2010 14:37
parser.py
try:
from lxml import etree
except:
from xml.etree import ElementTree as etree
from datetime import datetime
class Record(object):
""" Stores data about an artifact in TMS """
def __init__(self, **kwds):