Skip to content

Instantly share code, notes, and snippets.

View genecyber's full-sized avatar
🎯
Focusing

Shannon Code genecyber

🎯
Focusing
View GitHub Profile
Verifying myself: My Bitcoin username is +shannoncode. https://onename.io/shannoncode
@genecyber
genecyber / gist:aefe05a47898eedd1838
Created July 24, 2014 14:31
Cheat at planning poker (Bookmarklet to locally flip cards as they are played)
javascript: (function() {
var xray = function() {
var els = document.getElementsByClassName('estimate');
for (var i = 0; i < els.length; i++) {
var el = els[i];
if (el.getAttribute("class").indexOf("mine") < 0) {
el.setAttribute("class", el.getAttribute("class") + " mine");
}
}
setTimeout(xray, 1000);
@genecyber
genecyber / Overflow
Created July 24, 2014 14:36
Bookmarklet to easily add n characters to every input field on a page
javascript: (function() {
var count = prompt("Enter the number of random characters to add to found inputs.", "1000000");
jscript = document.createElement("script");
jscript.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js";
jscript.onload = jscript.onreadystatechange = function() {};
document.body.appendChild(jscript);
$.noConflict();
jQuery.noConflict();
jQuery.each(jQuery("input"), function() {
var name = this.attributes;
@genecyber
genecyber / gist:f5203c710b9dc3bad1db
Last active August 29, 2015 14:06
MUE address generate
var CoinKey = require('coinkey') //1.0.0
var ck = new CoinKey.createRandom({private: 0x8f, public: 0x0f})
console.log("Private Key (Wallet Import Format): " + ck.privateWif)
console.log("Private Key (Hex): " + ck.privateKey.toString('hex'))
console.log("Address: " + ck.publicAddress)
@genecyber
genecyber / gist:0ae75057b240dbc46b20
Created September 18, 2014 15:44
mue generate keys and sign
var CoinKey = require('coinkey') //npm install --save coinkey@1.0.0
var crypto = require('crypto') //Node.js or Browserify (browser)
var ecdsa = require('ecdsa') //npm install --save ecdsa
var ecurve = require('ecurve')
var ck = new CoinKey.createRandom({private: 0x8f, public: 0x0f})
console.log("Private Key (Wallet Import Format): " + ck.privateWif)
console.log("Private Key (Hex): " + ck.privateKey.toString('hex'))
@genecyber
genecyber / Step1
Last active August 29, 2015 14:07
<!--First I insert the following into an html page somewhere, since its inside script tags it's not rendered -->
<!--Note: I'm using a Title, a collection of Items and the Name from within each Item -->
<script id="leftModule" type="text/x-handlebars-template">
<ul class="leftMenu">
<li>
<div class="leftMenuSection">
{{Title}}
</div>
var source = $("#leftModule").html();
var template = Handlebars.compile(source);
var data = {
Title:"Handled",
Items: [
{Name: "Foo" },
{Name: "Bar" },
{Name: "Code" },
{Name: "Monkey" }
]};
@genecyber
genecyber / walletgen
Created November 22, 2014 05:54
N Counterwallet addresses Bookmarklet
javascript:(function()%7Bfunction%20go()%20%7B%20var%20n%20%3D%20prompt(%22How%20many%20wallets%3F%22%2C%20%22500%22)%3B%20%24(%22body%22).html(%22%22)%3B%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20n%3B%20i%2B%2B)%20%7B%20generatePassphrase()%3B%20%24(%22body%22).append(i%2B%22%3A%20%22%2BgeneratedPassphrase()%2B%22%3Cbr%3E%22)%3B%7D%7D%20go()%7D)()
@genecyber
genecyber / gist:ec4fb271e282c1f5a065
Last active August 29, 2015 14:10
N Counterwallet Address
function go() { var n = prompt("How many wallets?", "500"); x = new WalletCreationViewModel(); $("body").html("<span id=\"generated\" data-bind=\"text: generatedPassphrase\"></span><br>"); for (var i = 0; i < n; i++) { x.generatePassphrase(); $("body").append(i+": "+x.generatedPassphrase()+"<br>");}} go();
This would normally be a site with an input field to take input from the user of the watch being registered.