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
void setup() { | |
size(480,120); | |
} | |
void draw() { | |
int[] colours = {255, 100, 10}; | |
if(mousePressed) { | |
fill(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
adt -package -storetype pkcs12 -keystore sampleCert.p12 HelloWorld.air HelloWorld-app.xml HelloWorld.html AIRAliases.js |
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) { |
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
#!/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
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
@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
$(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
.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
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], |