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 getRGB(color) { | |
| // http://plugins.jquery.com/files/jquery.color.js.txt | |
| var result; | |
| // Check if we're already dealing with an array of colors | |
| if (color && color.constructor == Array && color.length == 3) | |
| return color; | |
| // Look for rgb(num,num,num) | |
| if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) |
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
| #!/usr/bin/env python | |
| import httplib | |
| import sys | |
| from urlparse import urlparse | |
| def head(url): | |
| r = urlparse(url) | |
| conn = httplib.HTTPConnection(r.netloc) | |
| pathquery = r.path |
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
| server { | |
| listen 80; | |
| server_name static.ammo.dev; | |
| access_log /var/log/nginx/ammostatic.access.log; | |
| location / { | |
| root /home/leroux/projects/ammo/static; | |
| if ($args ~* "^[rv]=.*$") { | |
| expires max; | |
| 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
| git log -1 --format=%H FILENAME |
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
| #!/usr/bin/env python | |
| import httplib | |
| import sys | |
| from urlparse import urlparse | |
| def post(url, params): | |
| r = urlparse(url) | |
| conn = httplib.HTTPConnection(r.netloc) | |
| pathquery = r.path |
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 http = require('http'), | |
| querystring = require('querystring') | |
| var PORT = 8124; | |
| http.createServer(function(req, res) { | |
| if (req.method == 'POST') { | |
| req.rawpostdata = ''; | |
| req.addListener('data', function(chunk) { | |
| req.rawpostdata += chunk.toString('ascii'); // I hope |
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
| /* | |
| <style> | |
| #detect.child > p, | |
| #detect.firstchild p:first-child, | |
| #detect.lastchild p:last-child, | |
| #detect.nthchild p:nth-child(2n+1), | |
| #detect.sibling b + b {display: block; width: 111px;} | |
| </style> | |
| */ |
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
| CodeMirror.defineMode("beard", function(config, parserConfig) { | |
| var beardOverlay = { | |
| token: function(stream, state) { | |
| if (stream.match("{{")) { | |
| while ((ch = stream.next()) != null) { | |
| if (ch == "}" && stream.next() == "}") { | |
| break; | |
| } | |
| } | |
| return "beard"; |
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
| /* | |
| A little node.js server for testing html5 ajax file uploads. | |
| It serves up the current directory and receives uploads at /upload. | |
| This is for use with xhr.send(file) where the entire request body is the file. | |
| It just pauses one second between chunks so that client-side progress events | |
| get a chance to fire. On my laptop it looks like the maximum chunk size is | |
| around 40K, so you would still need images in the range of hundreds of kilobytes | |
| to really be able to test it. |
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> | |
| <title>${account.twitter_screen_name} | upgrouper</title> | |
| <link rel="stylesheet" type="text/css" href="${cssurl}"> | |
| <script src="${jsurl}"></script> | |
| </head> | |
| <body> | |
| <h1>@${account.twitter_screen_name}</h1> |
OlderNewer