Between us [company name] and you [customer name]
This file contains hidden or 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
<?php | |
$root = $_SERVER['DOCUMENT_ROOT']; | |
chdir($root); | |
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
set_include_path(get_include_path().':'.__DIR__); | |
if(file_exists($root.$path)) | |
{ | |
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') | |
$path = rtrim($path,'/').'/index.php'; |
This file contains hidden or 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
import atexit | |
import subprocess | |
from django.core.management.commands.runserver import BaseRunserverCommand | |
from django.core.servers.basehttp import AdminMediaHandler | |
from django.conf import settings | |
# Patch runserver to run the sass and coffeesscript compilers automatically | |
class Command(BaseRunserverCommand): | |
active_processes = [] |
This file contains hidden or 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/python | |
# Dispatch - synchronize two folders | |
import os | |
import filecmp | |
import shutil | |
from stat import * | |
class Dispatch: | |
''' This class represents a synchronization object ''' |
This file contains hidden or 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
var sliding = false; // variable outside function scope to detect a slide is in progress | |
function slideTo(target, duration){ // credit to Mahieddine Abdelkader & Ludwig Wendzich for original ideas. | |
var to = isNaN(target) ? $(target).offset().top : target, //find scroll to position | |
from = $(window).scrollTop() //find starting point | |
dy = to-from, //calculate change in scroll position - deltaY | |
body = $("body"), // TODO: better to have it outside of local scope already rather than fetching it every time... | |
duration = isNaN(duration) ? 500 : duration; | |
// We're going to use translate-y to move the the page so it feels like we're at the *from* scroll position, when we're actually instantly at the *to* scroll position. */ |
This file contains hidden or 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
#!/bin/bash | |
# Sync Homebrew installations between Macs via Dropbox | |
# | |
BREW="/usr/local/bin/brew" | |
# first get local settings | |
echo "Reading local settings ..." | |
rm -f /tmp/brew-sync.* |
A fork of the popular open-source contract for web designers and developers by Stuff & Nonsense, reworded for developers
- Originally published: 05/02/2014
- Original post
Between us [company name] and you [customer name]
This file contains hidden or 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
# | |
# Name: nginx-tls.conf | |
# Auth: Gavin Lloyd <[email protected]> | |
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
# | |
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related | |
# to SSL/TLS are not included here. | |
# | |
# Additional tips: | |
# |
This file contains hidden or 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
@function strip-units($number) {// From : http://stackoverflow.com/a/12335841/1339426 | |
@return $number / ($number * 0 + 1); | |
} | |
/** | |
* Use em or rem font-size in Bootstrap 3 | |
* Ported from Less version here: https://gist.github.com/jasny/9731895 | |
*/ | |
$font-size-root: 18px; | |
$font-unit: 1rem; // Pick em or rem here |