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 randomNumberBlocks(l, bl) { | |
| for(var i=0,b=Array(l).join(' ').split(' ');i<l;i++) | |
| for(var j=0;j<bl;j++) | |
| b[i] += Math.floor(Math.random()*10); | |
| return b.join(' '); | |
| } | |
| randomNumberBlocks(4, 4); | |
| // => "5553 7870 7480 2855" |
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
| @font-face { | |
| font-family: sonar-bold; | |
| font-weight: bold; | |
| font-style: normal; | |
| src: url("/fonts/sonar-bold-webfont.eot"); | |
| src: url("/fonts/sonar-bold-webfont.eot?#iefix") format("embedded-opentype"), url("/fonts/sonar-bold-webfont.woff") format("woff"), url("/fonts/sonar-bold-webfont.ttf") format("truetype"), url("/fonts/sonar-bold-webfont.svg#sonar-bold") format("svg"); } | |
| @font-face { | |
| font-family: sonar-medium; | |
| font-weight: normal; |
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 | |
| RECIPIENT="name@domain.com" | |
| # current branch | |
| CURRENT=$(git symbolic-ref -q HEAD) | |
| CURRENT=${CURRENT##refs/heads/} | |
| CURRENT=${CURRENT:-HEAD} | |
| # branch names |
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
| $ = jQuery | |
| $.fn.extend | |
| progress: (options) -> | |
| settings = | |
| strokeWidth : 6 | |
| strokeColor : '#15d701' | |
| strokeColorFull: '#e73921' | |
| duration : 1500 |
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($) { | |
| // which methods should be silenced? | |
| var silenceBinders = ['On', 'One']; | |
| function silenceArguments(arguments) { | |
| // convert arguments to array | |
| var args = Array.prototype.slice.call(arguments, 0); | |
| // the last argument should be the callback |
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() { | |
| var oldSort = Array.prototype.sort; | |
| Array.prototype.sort = function(compareFunction) { | |
| return oldSort.call(this, compareFunction || function(a, b) { | |
| return a - b; | |
| }); | |
| } | |
| })(); |
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
| # SyntaxError: unexpected ':', expecting => | |
| person = { | |
| first_name : 'John', | |
| last_name : 'Doe', | |
| date_of_birth: '01.01.1971' | |
| } | |
| # works | |
| person = { | |
| first_name: 'John', |
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
| require 'rubygems' | |
| require 'middleman/rack' | |
| protected_middleman = Rack::Auth::Basic.new(Middleman.server) do |username, password| | |
| [username, password] == ['theuser', 'thepassword'] | |
| end | |
| run protected_middleman |
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
| /*! | |
| * Baseline Grid | |
| * | |
| * Renders a baseline grid on top of your page | |
| * | |
| * Copyright 2014 Florian Plank | |
| * Released under the MIT license | |
| * | |
| * | |
| * Usage: |