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
| div { | |
| -webkit-tap-highlight-color: rgba(0,0,0,0); | |
| } |
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
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg | |
| The first one in the list is a full size image and others are thumbnail images. | |
| For the high quality version of the thumbnail use a url similar to this: | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg |
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
| colors = { | |
| black: [0, 0, 0], | |
| white: [255, 255, 255], | |
| transparent: [255, 255, 255, 0], | |
| aqua: [0, 255, 255], | |
| lime: [0, 255, 0], | |
| silver: [192, 192, 192], | |
| maroon: [128, 0, 0], | |
| teal: [0, 128, 128], | |
| blue: [0, 0, 255], |
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
| .box { | |
| -webkit-backface-visibility: hidden; | |
| } |
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
| $(document).bind( | |
| 'touchmove', | |
| function(e) { | |
| e.preventDefault(); | |
| } | |
| ); |
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
| @iterations: 6; | |
| .h(@index) when (@index > 0) { | |
| h@{index} { | |
| font-size: 72px - @index*10; | |
| } | |
| .h(@index - 1); | |
| } | |
| .h(0) {} |
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 'rss/1.0' | |
| require 'rss/2.0' | |
| require 'open-uri' | |
| source = "https://news.ycombinator.com/rss" | |
| content = "" | |
| open(source) do |s| | |
| content = s.read | |
| end | |
| rss = RSS::Parser.parse(content, 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
| #!/bin/sh | |
| grep -R $1 * --color --exclude-dir=node_modules --exclude-dir=.svn --exclude-dir=.git |
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(window.navigator.standalone == true) { | |
| // My app is installed and therefore fullscreen | |
| } |
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 MongoClient = require('mongodb').MongoClient | |
| , request = require('request'); | |
| MongoClient.connect('mongodb://localhost:27017/reddit', function(err, db) { | |
| if(err) throw err; | |
| request('http://www.reddit.com/r/webdev/.json', function(error,response,body) { | |
| if(!error && response.statusCode == 200) { | |
| var obj = JSON.parse(body); | |
| var stories = obj.data.children.map(function(story) {return story.data;}); | |
| db.collection('webdev').insert(stories, function(err,data) { |