Skip to content

Instantly share code, notes, and snippets.

@patricksimpson
patricksimpson / .profile
Created Oct 26, 2012
This is my bash .profile
View .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
View git-shortcuts
alias gtfp='git tf pull --rebase'
alias gtfc='git tf checkin'
alias gtfpc='git tf pull --rebase | git tf checkin'
@patricksimpson
patricksimpson / git-tfs-push
Created Dec 7, 2012
Ultra lazy git tf push!
View git-tfs-push
#!/usr/bin/expect
set username "your.name"
set password "yoursupercoolpassword"
spawn git tf pull --rebase
expect "Username:";
send "$username\n";
expect "Password:";
send "$password\n";
interact
@patricksimpson
patricksimpson / copyBase.bat
Created Dec 7, 2012
Copies the base to the project folder for me... Windows Batch Script
View copyBase.bat
echo off
xcopy /Y f:\base.css C:\webroot\AIS-PS\Dev\vNext\Application\CNBTablet\CNBTabletApp\Content\base.css
echo "done."
ping 123.45.67.89 -n 1 -w 3000 > nul
View git-tfs-pull-rebase
#!/usr/bin/expect
set username "your.name"
set password "yoursupercoolpassword"
spawn git tf pull --rebase
expect "Username:";
send "$username\n";
expect "Password:";
send "$password\n";
interact
View git-tfs-pull
#!/usr/bin/expect
set username "your.name"
set password "yoursupercoolpassword"
spawn git tf pull
expect "Username:";
send "$username\n";
expect "Password:";
send "$password\n";
interact
View git-tfs-checkin.sh
#!/usr/bin/expect
set username "your.name"
set password "yoursupercoolpassword"
spawn git tf pull --rebase
expect "Username:";
send "$username\n";
expect "Password:";
send "$password\n";
interact
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
watch: {
grunt: {
files: ["Gruntfile.js", "package.json"],
tasks: "default"
},
javascript: {
files: ["src/client/**/*.js", "src/server/*.js", "specs/**/*Spec.js"],
View package.json
{
"name": "MochaJasmine",
"description": "Mocha and Jasmine Testing",
"version": "0.0.1",
"devDependencies": {
"grunt": "0.4.x",
"grunt-contrib-watch": "~0.2.0",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-jasmine": "~0.4.2",
"grunt-mocha-cli": "~1.0.2",
View client.js
var AppClient = function() {
this.name = "Panda";
};
AppClient.prototype.setName = function(name) {
this.name = name;
};
AppClient.prototype.getName = function() {
return this.name;