This file contains 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 removeURLParam = function (url, parameter) { | |
var fragment = url.split('#'), | |
urlparts= fragment[0].split('?'), | |
urlBase = '', | |
queryString = '', | |
prefix = '', | |
pars = null, | |
i = 0; | |
if (urlparts.length>=2) |
This file contains 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
sudo xcodebuild -license | |
xcode-select --install # There will be a GUI prompt | |
sudo cpan SVN::Core # use the "sudo" method when prompted | |
# Then add this to your ~/.profile: | |
# export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH | |
# Then probably: | |
brew reinstall git | |
brew reinstall subversion |
This file contains 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
RewriteRule ^/test /test?var=val [QSA] |
This file contains 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/expect | |
set password "thepassword" | |
set login "yourlogin" | |
set host "199.199.199.199" | |
set remotepath "/var/www/html/yoursite.com" | |
spawn ssh $host -l $login | |
expect "$login@$host's password: " | |
send "$password\n" |
This file contains 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
# Assignment: | |
number = 42 | |
opposite = true | |
# Conditions: | |
number = -42 if opposite | |
# Functions: | |
square = (x) -> x * x |
This file contains 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 App; | |
function App() { | |
this.panda = "sad"; | |
} | |
module.exports = App; |
This file contains 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 AppClient = function() { | |
this.name = "Panda"; | |
}; | |
AppClient.prototype.setName = function(name) { | |
this.name = name; | |
}; | |
AppClient.prototype.getName = function() { | |
return this.name; |
This file contains 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": "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", |
This file contains 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
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"], |
This file contains 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/expect | |
set username "your.name" | |
set password "yoursupercoolpassword" | |
spawn git tf pull | |
expect "Username:"; | |
send "$username\n"; | |
expect "Password:"; | |
send "$password\n"; | |
interact |