Skip to content

Instantly share code, notes, and snippets.

View ichpuchtli's full-sized avatar

Sam Macpherson ichpuchtli

View GitHub Profile
@rarous
rarous / Deploy.ps1
Created September 14, 2010 14:06
Script for packaging and deployment of ASP.NET applications to IIS via Web Deploment Tools
Properties {
$Build_dir = Split-Path $psake.build_script_file
$Packages_dir = Join-Path $build_dir 'Packages'
$MsDeploy_dir = Join-Path $env:ProgramFiles 'IIS\Microsoft Web Deploy'
$SiteName = 'www.example.com'
$Package = "$SiteName.zip"
$Dest = 'hosting.com'
$UserName = 'IIS User Name'
$Pwd = 'Secret Password'
@psychemedia
psychemedia / f1TimingPDFsScrpaer.py
Created April 10, 2011 21:46
Scraperwiki script for scraping data from FIA/F1 timing sheets/PDFs
import scraperwiki
import urllib2
import lxml.etree
'''
Code to pull data out of the timing related press releases issued by FIA for Formula One races.
This code is provided solely for your own use, without guarantee, so you can publish F1 timing data,
according to license conditions specified by FIA,
without having to rekey the timing data as published on the PDF press releases yourself.
@joshuaflanagan
joshuaflanagan / package.bat
Created June 24, 2011 02:57
Examples of how to build all Nuget nuspec files in a folder
@ECHO OFF
SETLOCAL
SET VERSION=%1
SET NUGET=buildsupport\nuget.exe
FOR %%G IN (packaging\nuget\*.nuspec) DO (
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts
)
@enjalot
enjalot / index.html
Created September 8, 2011 15:15
Simple Pie Chart example with D3.js
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script>
<style type="text/css">
@ei-grad
ei-grad / .Xdefaults
Created August 14, 2012 01:47
My urxvt config.
!! Appearance
urxvt.termName: rxvt-unicode
urxvt.scrollBar: false
urxvt.background: black
urxvt.foreground: gray
!! Font prefferenes
urxvt.font: xft:DejaVu Sans Mono:pixelsize=13
urxvt.boldFont: xft:DejaVu Sans Mono:pixelsize=13:weight=bold
urxvt.letterSpace: -1
!! Larger history limit
@k33g
k33g / gist:3959903
Created October 26, 2012 16:57
Patterns & Typescript

##The Singleton Pattern

class SantaClaus {

	private static uniqueInstance : SantaClaus;
	
@fmsf
fmsf / jquery update plugin
Last active December 9, 2015 22:58
Mini jquery plugin to update a stored jQuery object based on the original selector string. It will effectively replace all previous dom nodes with the ones matched when the update function is called;
(function ( $ ) {
$.fn.update = function(){
var newElements = $(this.selector),i;
for(i=0;i<newElements.length;i++){
this[i] = newElements[i];
}
for(;i<this.length;i++){
this[i] = undefined;
}
this.length = newElements.length;
@Garland-g
Garland-g / Res.sh
Last active November 26, 2019 20:03
This is a script that will change the resolution in Linux on a Macbook Pro Retina computer. Nvidia-current is required for the script to function properly. Tested in Ubuntu 13.04 (alpha).
#!/bin/bash
#Author: Travis Gibson
#This script requires an argument for the resolution width
#Thanks go out to eCharles for a patch in the comments of this link here: http://blog.echarles.net/2013/10/01/Ubuntu-13.04-On-MacbookPro-Retina
if [ -z "$1" ]; then
echo "Usage: Res.sh <resolution_width>";
exit 1;
fi
erg=$( echo "$1")
check=$(xrandr -q | grep DP-2 | cut -d " " -f 4 | cut -d "x" -f 1)
@pmeenan
pmeenan / user-timing-rum.js
Last active January 18, 2024 23:46
Support routine for adding W3C user timing events to a site. Includes some basic polyfill support for browsers that don't support user timing or navigation timing (though the start time for non-navigation timing support could be improved with IE < 9 to use IE's custom start event).
// Support routines for automatically reporting user timing for common analytics platforms
// Currently supports Google Analytics, Boomerang and SOASTA mPulse
// In the case of boomerang, you will need to map the event names you want reported
// to timer names (for mPulse these need to be custom0, custom1, etc) using a global variable:
// rumMapping = {'aft': 'custom0'};
(function() {
var wtt = function(n, t, b) {
t = Math.round(t);
if (t >= 0 && t < 3600000) {
// Google Analytics
@matthiasg
matthiasg / docs style (bootstrap)
Created August 5, 2013 06:26
the callouts from the bootstrap documentation
/* Side notes for calling out things
-------------------------------------------------- */
/* Base styles (regardless of theme) */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;