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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>content</key> | |
| <string>describe("${1:description}", function() { | |
| before(function() { | |
| $2 | |
| }); | |
| after(function() { |
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 isPlainObject(val){ | |
| return val.toString() === "[object Object]"; | |
| } | |
| isPlainObject({}) // => true | |
| isPlainObject([]) // => false | |
| isPlainObject(function(){}) // => false |
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
| define([ | |
| 'jquery' | |
| ], function ($) { | |
| "use strict"; | |
| /** | |
| * Method for switching between 2 or multiple classes | |
| * @param {String} currentClasses The classes that currently exists | |
| * @param {String} newClasses The classes we want to change to | |
| * @param {Mixed} [expression] Expression/callback that will be evaluated. |
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 $super = function(funcName){ | |
| funcName = funcName || 'initialize'; | |
| // _.bindAll messes upp constructor | |
| // TODO: Add more tests with multiple inheritance | |
| var _super = this.constructor.__super__ || this.__proto__.constructor.__super__; | |
| return _super[funcName].apply(this, _.rest(arguments)); | |
| }, | |
| _$super = function(funcName){ | |
| funcName = funcName || 'initialize'; |
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
| express = require 'express' | |
| engines = require 'consolidate' | |
| routes = require './routes' | |
| app = express() | |
| exports.startServer = ((config) -> | |
| server = @listen config.server.port, -> | |
| console.log "Express server listening on port %d in %s mode", server.address().port, app.settings.env |
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
| ========= server.coffee =========== | |
| server.coffee | |
| express = require 'express' | |
| engines = require 'consolidate' | |
| #sugar = require './assets/javascripts/vendor/sugar' | |
| # Create ExpressServer | |
| app = express() | |
| exports.startServer = ((config) -> |
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
| # These are my notes from the PragProg book on CoffeeScript of things that either | |
| # aren't in the main CS language reference or I didn't pick them up there. I wrote | |
| # them down before I forgot, and put it here for others but mainly as a reference for | |
| # myself. | |
| # assign arguments in constructor to properties of the same name: | |
| class Thingie | |
| constructor: (@name, @url) -> | |
| # is the same as: |
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
| # editorconfig.org | |
| root = true | |
| [*] | |
| indent_style = space | |
| indent_size = 2 | |
| end_of_line = lf | |
| charset = utf-8 | |
| trim_trailing_whitespace = true |
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/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
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 | |
| # Usage: bash <(curl -sL http://bit.ly/1KhQDUU) | |
| # https://confluence.atlassian.com/display/BITBUCKET/ssh-keys+Resource | |
| echo "\n" | |
| printf "Bitbucket account name: " | |
| read account | |
| printf "Bitbucket user: " |
OlderNewer