View MobileUADetector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
View Protocol.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
View decrypt.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 = { |
View mousespeed-sparkline.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
View gist:965603
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
View gist:2cdcbfda12f97cdfdfb6ad653e34ec2d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x4871a20288978AC20b0914191710d3be750C6dBe |
View placepaintbot4.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== |
View Lifeboat Wikipedia Export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
View gist:5478428
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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 = |
View MonitorLoad.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.actor.{Props, Actor} | |
import concurrent.ExecutionContext | |
import play.api.Logger | |
import play.libs.Akka | |
import scala.concurrent.duration._ | |
import ExecutionContext.Implicits.global | |
case object Tick | |
NewerOlder