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
| #preview { | |
| padding: 20px; | |
| width: 47%; | |
| box-sizing: border-box; | |
| } | |
| .shadowbox { | |
| -webkit-box-shadow: 0 0 80px rgba(0, 0, 0, 0.30), inset 0 0 5px rgba(0, 0, 0, 0.6); | |
| } ^ ^ |
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
| /** | |
| * Monkey patch `Backbone.Model.extend()` with ES5 getters/setters for each | |
| * attribute defined in the defaults. Gives you the added bonus of being | |
| * to pass your backbone models directly to your Mustache.js views. | |
| * | |
| * Example: | |
| * | |
| * var User = Backbone.Model.extend({ | |
| * defaults: { | |
| * username: undefined, |
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
| if (!Object.defineProperty) { | |
| if (Object.__defineGetter__) { | |
| Object.defineProperty = function(obj, name, options) { | |
| if (!options) throw new Error("`options` is a required argument."); | |
| if ("get" in options || "set" in options) { | |
| if ("get" in options) { | |
| obj.__defineGetter__(name, options.get); | |
| } | |
| if ("set" in options) { |
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 | |
| # | |
| # What this script should do: | |
| # | |
| # /repository <- source directory | |
| # /foo/rad.dll | |
| # /bar/cool.dll | |
| # | |
| # /other <- dlls get copied to here | |
| # /rad.dll |
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 | |
| # | |
| # This script builds the project before a commit takes place. If the build | |
| # fails, the commit is rejected and the build log is printed. | |
| echo "Building solution..." | |
| # Build the solution in Release mode... | |
| LOG=`/c/Windows/Microsoft.NET/Framework/v3.5/MSBuild.exe "/property:Configuration=Release" "/verbosity:n" "/target:Clean;Rebuild"` |
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
| .tip { | |
| position: absolute; | |
| background: #FFF; | |
| border: 4px solid #e9e6e1; | |
| border-radius: 7px; | |
| box-shadow: 0px 0px 4px rgba(0,0,0,0.7); | |
| padding: 0; | |
| margin: 0; | |
| list-style: none; | |
| font-size: 12px; |
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
| // warning: pseudo-code | |
| var TRANSITIONS_SUPPORTED = false; | |
| (function() { | |
| var div = document.createElement('div'); | |
| div.innerHTML = '<div style="transition:color 1s linear;-ms-transition:color 1s linear;-o-transition:color 1s linear;-webkit-transition:color 1s linear;-moz-transition:color 1s linear;"></div>'; | |
| var prefixes = ['', '-webkit-', '-moz-', '-o-', '-ms-']; | |
| for (var i=0; i<prefixes.length; i++) { | |
| if (prefixes[i] + 'transition' in div.firstChild.style) { | |
| TRANSITIONS_SUPPORTED = true; | |
| break; |
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 thing = { | |
| data: [1, 2, 3], | |
| valueOf: function() { | |
| var result = 0; | |
| this.data.forEach(function(x) { | |
| result += x; | |
| }); | |
| return result; | |
| } | |
| }; |
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 User = require("lib/models/user-model"); | |
| User.find("dandean", function(e, user) { | |
| user.email = "[email protected]"; | |
| user.save(); | |
| }); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <meta name="viewport" content="width=724, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <meta name="apple-mobile-web-app-status-bar-style" content="black" /> | |
| <title>Page Control</title> | |
| <style> |