It’s interesting to see what designs and features others have come up with. Link to Jekyll-powered blogs and other sites here.
- Tom Preston-Werner (source)
- Koliseo Help Site - Help site of a ticketing platform
It’s interesting to see what designs and features others have come up with. Link to Jekyll-powered blogs and other sites here.
| #!/bin/bash | |
| # First install 't', the Twitter command line client: https://github.com/sferik/t#readme | |
| # This is a Ruby gem and if you are on Mac OS X or any flavour of *nix you're probably got Ruby. | |
| # Next ensure you have 'curl' installed (on Mac OS X you probably do) | |
| # Given these two prerequisites then... | |
| # Step 1: Grab the latest #ygk fluff filter from Gist #4297661 in raw form |
| // assuming jQuery for its extend method. | |
| // Calling program does this, and passes-in the options | |
| var options = { validate: true, name: "bar" }; | |
| function myThing ( options ) { | |
| // Internally your program does this | |
| var empty = {} | |
| var defaults = { validate: false, limit: 5, name: "foo" }; |
| c={} | |
| e="someMethod"; | |
| preProcessPost =function(c,e) { | |
| var e1=e+"Pre",e2=e+"Process",e3=e+"Post"; | |
| c[e]=function(o){ | |
| if (this[e1](o)) { | |
| this[e2](o); | |
| this[e3](o); | |
| } | |
| }; |
| // custom layout width for blueprint based layouts | |
| // Original: http://www.consulenza-web.com/progetti/jquery_blueprint/ | |
| // from http://james.padolsey.com/javascript/regex-selector-for-jquery/ | |
| jQuery.expr[':'].regex = function(elem, index, match) { | |
| var matchParams = match[3].split(','), | |
| validLabels = /^(data|css):/, | |
| attr = { | |
| method: matchParams[0].match(validLabels) ? |
| # from http://snippets.dzone.com/posts/show/5002 | |
| alias dierails='ps -a|grep "/usr/local/bin/ruby script/server"|grep -v "grep /usr"|cut -d " " -f1|xargs -n 1 kill -KILL $1' | |
| alias resetrails='ps -a|grep "/usr/local/bin/ruby script/server"|grep -v "grep /usr"|cut -d " " -f1|xargs -n 1 kill -HUP $1' |
| ygktraffic -rt -from:YGKTraffic -from:cityofkingston -mt -ckws -dog -thank -thanks -love -/via -ticket -sidewalk -sidewalks |
| #ygk -rt -nailaj -ckws* -morril -vieiraflytrap -jason_michael -realtoranselmo -KingstonFronts -frontsingame -JoeDKtown -bbbaugh2 -buyingsolo -thebrickriocan -ddsnorth -moradio1043 -kingstonteam -whiglive -west_surgeoner -tmj_on_nursing -shima_ygk -AtomicaKingston -ChienNoirBistro -KEYS_Employment -983FLYFM -989THEDRIVE -FM96Ktown -west76grill -Sold85 -jmillard01 -tourismkingston -megaloskingston -dianegiberson -brenda_slomka -I2W2013 -rsourcetweets -tmj_ON_health -ygktraffic -ygkrts |
| // for contrasting text color | |
| // Original article: http://24ways.org/2010/calculating-color-contrast | |
| function getContrastYIQ(hexcolor){ | |
| var r = parseInt(hexcolor.substr(0,2),16); | |
| var g = parseInt(hexcolor.substr(2,2),16); | |
| var b = parseInt(hexcolor.substr(4,2),16); | |
| var yiq = ((r*299)+(g*587)+(b*144))/1000; | |
| return (yiq >= 131.5) ? 'black' : 'white'; | |
| } |
| // Return an object who's members match a reference array of keys | |
| // reference=["b","c","f","r"]; | |
| // obj={"a":1, "b":2, "c":3, "d":4, "r":18}; | |
| // _.filterObj(obj, reference) | |
| // => { b : 2, c : 3, r : 18} | |
| _.mixin( { | |
| filterObj : function( obj, reference ) { | |
| if ( reference && typeof reference == 'object' ) { reference=_.keys( reference ); } | |
| var intersect = _.intersect(reference, _.keys(obj)), retObj= {}; | |
| _.map( intersect, function( el) { retObj[el]=obj[el];}) |