Skip to content

Instantly share code, notes, and snippets.

View jmazzi's full-sized avatar

Justin Mazzi jmazzi

View GitHub Profile
rsync -aPH -e "ssh" --rsync-path="sudo rsync" ubuntu@server:/remote_path /local_path
@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'
@jmazzi
jmazzi / getlibs
Created November 19, 2010 20:09
getlibs script for resolving a binaries dependencies
#!/bin/bash
#The MIT License
#
#Copyright (c) 2007 Cappy
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
@jmazzi
jmazzi / net_http_hacked.rb
Created March 15, 2011 15:20
Discard bad HTTP headers in Net::HTTP.
# Based on 1.9.2. Works in 1.8.7 too, though
module Net
class HTTP
@skip_bad_headers = false
class << self
def skip_bad_headers
@skip_bad_headers
end
tippmann 98 custom paintball gun set
casio protrek PRW2500T-7CR watch
google nexus 4
apple magic trackpad
#!/bin/bash
set -ex
rm -rf ~/work/src/vico
cd ~/work/src
git clone https://github.com/vicoapp/vico.git
cd vico
make app
rm -rf /Applications/Vico.app
mv ~/work/src/vico/build/Debug/Vico.app /Applications/Vico.app
require 'monitor'
require 'celluloid'
class BossArray < Array
include MonitorMixin
def initialize(*args)
super(*args)
end
require 'logger'
class MultiLog
def initialize(*loggers)
@loggers = loggers
end
def write(message)
@loggers.map { |log| log.write(message) }
end
.
├── README.md
├── pom.xml
└── src
├── main
│   └── java
│   └── com
│   └── seriouscompany
│   └── business
│   └── java
#!/usr/bin/env ruby
require 'open-uri'
require 'cgi'
class Anagram
def initialize(phrase)
@phrase = phrase
@response = fetch
end