Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
ChrisMcKee / rakefile.rb
Created April 25, 2011 21:32 — forked from jonhilt/rakefile.rb
A simple Rake build script example
require 'albacore'
require 'fileutils'
PROJECT_NAME = "Your Project Here"
DOT_NET_PATH = "C:/Windows/Microsoft.NET/Framework/v4.0.30319/"
NUNIT_PATH = "Tools/nunit/"
MSPEC_PATH = "Tools/mspec/"
PROJECT_CONFIG = (ENV['PROJECT_CONFIG'] == nil) ? "Debug" : ENV['PROJECT_CONFIG']
COMPANY_NAME = "Your Company Here"
BUILD_NUMBER = (ENV['BUILD_NUMBER'] == nil) ? "1.0.0.0" : ENV['BUILD_NUMBER']
require 'rake'
require 'albacore'
build_dir = "../build"
bin_dir = "#{build_dir}/bin"
src_dir = "../src"
solution = "#{src_dir}/Example.sln"
release_dir = "#{build_dir}/release"
package_dir = "#{build_dir}/package"
@ChrisMcKee
ChrisMcKee / .gitignore
Created June 9, 2011 12:54
.gitignore file for magento projects
.htaccess
.htaccess.sample
LICENSE.html
LICENSE.txt
LICENSE_AFL.txt
RELEASE_NOTES.txt
app/*.*
app/*/*.*
app/*/*/*.*
!app/etc/modules/<Namespace>_*.xml
@ChrisMcKee
ChrisMcKee / selenium.sh
Created February 17, 2012 12:08 — forked from lifeeth/selenium.sh
selenium init.d script for debian
#!/bin/bash
# /etc/init.d/selenium
# debian-compatible selenium-grid startup script.
# Based on jenkins startups
# Praneeth Bodduluri <lifeeth[at]gmail.com>
# update-rc.d -n -f selenium start 90 2 3 4 5 . stop 10 0 1 6 .
### BEGIN INIT INFO
# Provides: selenium-grid
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
@ChrisMcKee
ChrisMcKee / senderror.js
Created April 4, 2012 12:40 — forked from pamelafox/senderror.js
Sending JS errors to server
function sendError(message, url, lineNum) {
var i;
// First check the URL and line number of the error
url = url || window.location.href;
lineNum = lineNum || 'None';
// If the error is from these 3rd party script URLs, we ignore
// We could also just ignore errors from all scripts that aren't our own
var scriptURLs = [
@ChrisMcKee
ChrisMcKee / crime.py
Created September 11, 2012 22:47 — forked from koto/crime.py
It's not a crime to build a CRIME
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="
using ServiceStack.WebHost.Endpoints;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security;
using ServiceStack.Common.Web;
using ServiceStack.Logging;
using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
$ cat /etc/redhat-release
CentOS release 5.9 (Final)
$ arch
i686
$ cd /usr/local/src
$ sudo wget http://redis.googlecode.com/files/redis-2.6.11.tar.gz
$ sudo tar xzvf redis-2.6.11.tar.gz
$ cd redis-2.6.11
$ sudo make
zmalloc.o: In function `zmalloc_used_memory`:
using System;
using System.Collections.Specialized;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Moq;
/// <summary>
/// This helper class can be used to set up Moq mocks of MVC3 controllers.
/// Slightly modified from the original version from Scott Hanselman's blog:
@ChrisMcKee
ChrisMcKee / es.sh
Created January 28, 2014 11:48 — forked from nodesocket/es.sh
cd ~
sudo yum -y install java-1.7.0-openjdk
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.1.zip
unzip elasticsearch-0.90.1.zip
rm -rf elasticsearch-0.90.1.zip
mv elasticsearch-0.90.1 elasticsearch
sudo mv elasticsearch /usr/local/share
cd /usr/local/share