Skip to content

Instantly share code, notes, and snippets.

View gvlx's full-sized avatar

Gerardo Lisboa gvlx

View GitHub Profile
@jmazzi
jmazzi / lastpass_to_keepassx.rb
Created June 13, 2010 19:57
Convert LastPass CSV to KeePassX XML
#!/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'
@swdunlop
swdunlop / fuzzex.py
Created December 21, 2010 11:08
Random string generator using regex-like expressions
#!/usr/bin/env python
# Copyright (C) 2010, Scott W. Dunlop <swdunlop at gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
@creationix
creationix / streamtest.js
Created January 1, 2011 08:57
A sample client for creationix/jsonparse that consumes the twitter feed and filters out messages and names
var Parser = require('./jsonparse');
var Http = require('http');
var p = new Parser();
// IMPORTANT, put your username and password in here
var username = "yourTwitterUsername", password = "yourPassword";
var client = Http.createClient(80, "stream.twitter.com");
var request = client.request("GET", "/1/statuses/sample.json", {
"Host": "stream.twitter.com",
"Authorization": (new Buffer(username + ":" + password)).toString("base64")
});
@jed
jed / README.md
Created April 4, 2011 14:02
a small module for autorequiring. warning: MAGIC!

autorequire.js

Copyright (c) 2011 Jed Schmidt

a small module for auto-importing modules in node.js.

usage

require( "./autorequire" )
require.auto( <module-name> )
#!/usr/bin/env ruby
# Pow Port
#
# Quickly and easily change the port that Pow is running on. This allows
# you too run Apache and Pow side-by-side (on different ports of course).
#
# WARNING: This will OVERWRITE your ~/.powconfig file. If you have custom
# configurations in there, please back it up first.
#
@ches
ches / pow
Created April 14, 2011 07:43
A quick script to switch between running Pow and Apache on OS X
#!/bin/sh -e
#/ Usage: pow [on|off]
#/ Toggle between running Pow (http://pow.cx) and Apache on Mac OS X.
# Show Usage
function usage {
grep '^#/' "$0" | cut -c4-
exit 2
}
[ -z "$1" -o "$1" = "--help" ] && usage
@cloudhead
cloudhead / gist:967157
Created May 11, 2011 19:38
LESS v1.1.0 - What's new

LESS v1.1.0 - What's new

@arguments special variable:

  .box-shadow () { -webkit-box-shadow: @arguments }

string interpolation:

content: "hello @{var}"; // replaced with value of @var

Gem::Specification.new do |s|
s.name = 'bang'
s.version = '0.1.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jeff Kreeftmeijer'
s.email = 'jeff@kreeftmeijer.nl'
s.summary = 'Bang!'
s.description = 'Bangs existing model methods'
s.files = ['bang.rb']
@tomster
tomster / .gitconfig
Created September 25, 2011 11:48
An example git configuration including convenience aliases, some saner default behavior, a neat shell prompt and tab completion that can display the name of the tracking remote
# ~/.gitconfig
[branch]
autosetupmerge = true
[push]
default = current
[core]
excludesfile = .gitignore
@stefanv
stefanv / sparks.py
Created November 17, 2011 00:25
Command line sparks in Python
#!/usr/bin/python
# coding=utf-8
# Python version of Zach Holman's "spark"
# https://github.com/holman/spark
# by Stefan van der Walt <stefan@sun.ac.za>
"""
USAGE: