Skip to content

Instantly share code, notes, and snippets.

View ripper234's full-sized avatar
💭
Angel Investor & Advisor

Ron Gross ripper234

💭
Angel Investor & Advisor
View GitHub Profile
@ripper234
ripper234 / gist:3231276
Created August 1, 2012 22:30
Hello PGP World
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
FYI World, I now have an official public key.
It is availble here: http://pgp.mit.edu:11371/pks/lookup?search=ron+gross&op=index
Specifically, it is this one: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6016B419893E4632
I've been meaning to generate a public key for some time, and finally I had an actualy need for this.
(A company I'm doing business with asked me to verify my identity and communications via PGP)
@ripper234
ripper234 / MobileUADetector
Created May 31, 2012 09:46
Detect mobile user agent in Java
import java.util.regex.Pattern;
/**
* Detect mobile User Agent
*
* Adpated from http://detectmobilebrowsers.com/download/cs on 31/05/2012
*/
public class MobileUADetector {
private final static Pattern mobile_b = Pattern.compile("android.+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
@ripper234
ripper234 / Protocol.txt
Created January 17, 2012 09:21
How to decode messages stored in the Bitcoin blockchain with btcmsg
BTCmsg Protocol v1 (2011-09-18)
===============================
Each message is represented by multiple payment which is calculated by
the following algorithm:
1. Two first chars for message type ('01' for md5, '02' for ascii).
2. Then the message in hex (python binascii.hexlify).
3. Split the long string to groups of 4 hex digits.
4. Each group of 4 hex (e.g. 2 ascii letters from the message) is
represented by a payment in satoshi (maximum 0xffff=65535).
@ripper234
ripper234 / decrypt.js
Created February 22, 2013 21:23
Password checker for encrypted JSON from blockchain.info (My Wallet) bitcoin wallet
// To run this:
// 1. Install node.js
// 2. Fill in encrypted & password below
// 3. node decrypt.js
var encrypted = ''; // copy paste encrypted json here
var password = ''; // your password goes here
(typeof Crypto == "undefined" || !Crypto.util) && function () {
var a = Crypto = {}, b = a.util = {
function drawMouseSpeedDemo() {
var mrefreshinterval = 500; // update display every 500ms
var lastmousex=-1;
var lastmousey=-1;
var lastmousetime;
var mousetravel = 0;
var mpoints = [];
var mpoints_max = 30;
$('html').mousemove(function(e) {
var mousex = e.pageX;
// original (broken) version is here: http://ivan-ghandhi.livejournal.com/942493.html
// My fix: don't treat arguments as if it were an array
// (Use Array.prototype.slice.call() to convert it)
function stacktrace() {
function st2(f) {
return !f ? [] :
st2(f.caller).concat([f.toString().split('(')[0].substring(9) + '(' + Array.prototype.slice.call(f.arguments).join(',') + ')']);
}
return st2(arguments.callee.caller);
0x4871a20288978AC20b0914191710d3be750C6dBe
@ripper234
ripper234 / placepaintbot4.js
Last active April 2, 2017 18:53 — forked from mbarkhau/placepaintbot4.js
placepaintbot4.js
// ==UserScript==
// @name PlacePaintBot
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Domination of Place!
// @author mbarkhau
// @match https://www.reddit.com/place?webview=true
// @grant none
// ==/UserScript==
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.8/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en">
<siteinfo>
<sitename>Wikipedia</sitename>
<base>http://en.wikipedia.org/wiki/Main_Page</base>
<generator>MediaWiki 1.22wmf2</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
<namespace key="-1" case="first-letter">Special</namespace>
@ripper234
ripper234 / gist:5478428
Created April 28, 2013 21:08
Export of the Wikipedia article about Lifeboat Foundation, preserved in case it is deleted.
<!-- Please do not remove or change this AfD message until the issue is settled -->
{{AfDM|page=Lifeboat Foundation (2nd nomination)|year=2013|month=April|day=26|substed=yes|origtag=afdx}}
<!-- End of AfD message, feel free to edit beyond this point -->{{notability|date=April 2013}}
{{refimprove|date=April 2013}}
{{Infobox organization
| name = Lifeboat Foundation
| former name =
| image =
| image_border =