Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
#
# I recommend using Pocket to do the export. It works better than the browser extensions.
require 'rubygems'
require 'htmlentities'
require 'csv'
# CHANGE THIS
input_file = '/path/to/passwords.csv'
CREATE TABLE `user` (
`twitter_id` int(10) unsigned NOT NULL,
`created_at` timestamp NOT NULL default '0000-00-00 00:00:00',
`name` varchar(80) NOT NULL,
`screen_name` varchar(30) NOT NULL,
`location` varchar(120) default NULL,
`description` varchar(640) default NULL,
`profile_image_url` varchar(400) NOT NULL,
`url` varchar(100) default NULL,
@iambibhas
iambibhas / chat-frontend.js
Created September 1, 2012 18:35 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@iambibhas
iambibhas / uastring.py
Created August 1, 2012 18:41 — forked from mehulved/uastring.py
User Agent strings in more usable format
def uastring(platforms, format):
'''
This function is used to retrive User Agent String for various browsers/platforms from www.useragentstring.com.
Aim of this module is to simplify using the available data.
To find the value of the platform, visit http://useragentstring.com and get the part after /pages/
The platform parameter should be a set of one or more platforms. Supported formats are csv, json and xml.
'''
import requests
import BeautifulSoup as bsoup