Skip to content

Instantly share code, notes, and snippets.

@ragekit
ragekit / static_server.js
Created November 1, 2015 04:14 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@ragekit
ragekit / lucifer
Created April 6, 2015 13:00
convert video to webm + embed it in webpage using base64 and store it in dropbox
#!/usr/bin/env python
import sys
import os
import base64
from subprocess import call
from subprocess import Popen, PIPE
from os.path import expanduser
for f in sys.argv[1:]:
pathToDropBoxFolder = expanduser("~")+"/Dropbox/"
@ragekit
ragekit / tumblrLikeBackup.rb
Created July 11, 2013 13:38
Easy way to backup your tumblr likes
require "oauth"
require 'json'
require 'uri'
#CONFIG :
oauthConsumer = "consumerkey"
oauthSecret ="consumersecret"
tumblrUsername="mail"
@ragekit
ragekit / twitterParser.js
Last active December 16, 2015 04:48
Parse twitter webpage saved locally, and output tweets in the correct reading order in the console (nodejs)
var fs = require("fs");
var cheerio = require('cheerio');
fs.readFile('input.html','utf8', function (err, data) {
if (err) throw err;
var $ = cheerio.load(data);
$('.js-tweet-text').html();
var tweets = []
$('.js-tweet-text').each(function(index,element)
{