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 open = require('open'); | |
var url = require('url'); | |
var http = require('http'); | |
var twitterAPI = require('node-twitter-api'); | |
var Q = require('q'); | |
var authObject = (function () { | |
var deferred = Q.defer(); | |
var twitter = {}; | |
var token = {}; |
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
mogrify -resize 200% *.jpg | |
rename 's/\.jpg$/\@2x.jpg/' *.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
:'<,'>s/\s\+"/"/g |
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 industriesResizeTimeout; | |
var lastElementScrolled = ''; | |
$(window).on('scroll', function () { | |
var last = undefined; | |
$('a[name]').each(function () { | |
if(($(window).scrollTop() - ($(this).offset().top-155)) > 0) { | |
last = $(this).attr('name'); | |
} | |
}); |
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 usb.core | |
import time | |
import sys | |
dev = usb.core.find(idVendor=int(sys.argv[2], 16), idProduct=int(sys.argv[2], 16)) | |
mesg = dev.ctrl_transfer(0xc0, 51, 0, 0, 2) | |
# here we should check if it returned version 2 | |
time.sleep(1) |
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 lang="en"> | |
<head> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> | |
<meta charset="UTF-8"> | |
<title>Example - example-$route-service-production</title> | |
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
find -f . png | while read line; do pngcrush -ow -brute $line; done |
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
//Found this on stack. Credit to the guy that wrote it! | |
public class TupleList<T1, T2> : List<Tuple<T1, T2>> | |
{ | |
public void Add( T1 item, T2 item2 ) | |
{ | |
Add( new Tuple<T1, T2>( item, item2 ) ); | |
} | |
} | |
/* |
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
find . -name '*.jpg' | sort -r | gawk 'BEGIN{ a=1 }{ printf "mv \"%s\" %04d.jpg\n", $0, a++ }' | bash |
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
{ | |
"name": "resizer", | |
"version": "1.0.0", | |
"description": "", | |
"main": "resizer.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", |
OlderNewer