Skip to content

Instantly share code, notes, and snippets.

View mikeyb's full-sized avatar

Baby Goat mikeyb

View GitHub Profile

Indonesian: Otak bodohmu terbuat dari pasir pantai yang kotor.

@mikeyb
mikeyb / devices.js
Created June 29, 2017 04:02 — forked from paudirac/devices.js
Mithril demonstration.
var m = require('mithril');
var devices = {};
devices.controller = function() {
let url = "http://localhost:8989/devices";
return {
devices: m.request({method: "GET", url: url }),
remove: function(name) {
return m.request({ method: "DELETE", url: `${url}/${name}` });
}
@mikeyb
mikeyb / detect-card-type.js
Created June 29, 2017 03:51 — forked from craigmaslowski/detect-card-type.js
Credit Card Type Detection
// card type prefixes sourced from: https://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29
var cardTypes = {
'American Express': [
[34],
[37]
],
'Diners Club Intl': [
[300, 305],
[309],
[36],
Pattern: 1Keno
Address: 1Kenoy5F9RBQsgonT559qRbUmsVVLUURLi
Privkey: 5HpPMRXWYvnZzKGkXMbj9QwUZ5FNsA8V7sEWArVfz9RtW7cRm3x
Pattern: 1Keno
Address: 1KenohcYV8r9o2HHDCPVPbPDK5xsWGqWdu
Privkey: 5JvkbJWQdpf9JDRcjYY9eVWnqFcdMNKZofJFCD3L5w21ZQTH7sH
Pattern: 1Keno
Address: 1Kenoqxd5Fd9vb2nHgJ4K3wxujvXEghr9N
Privkey: 5HvbswV7MT4HtD4staUWDpQmA58gjgzeB16pYmPvh71vM1oC5bj
Pattern: 1Keno
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@mikeyb
mikeyb / dat meekan
Last active February 14, 2017 17:06
[10:03]
mikeyb meekan you are rad
[10:03]
meekanAPP This will not stand, you know, this aggression will not stand, mikeyb
@mikeyb
mikeyb / WebSocketHelper.ts
Created February 6, 2017 18:00 — forked from hmdhk/WebSocketHelper.ts
A websocket helper class written in typescript for use with angularjs
module Utilities {
export class WebSocketHelper {
constructor(private $q: ng.IQService, private url: string, private connectionInterval = 5000) {
}
private wsPromise: ng.IPromise<WebSocket>;
private createWebSocket(): ng.IPromise<WebSocket> {
var d = this.$q.defer();
#!/bin/bash
read -s KEY
curl "http://localhost:7733/api/v1/mining/stop/${KEY// /%20}?api_key=YOURAPIKEY"
sleep 2
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' 'http://localhost:7733/api/v1/mining/info?api_key=YOURAPIKEY'
#!/bin/bash
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d '' 'http://heatstatus.com:7733/api/v1/mining/info?api_key=YOURAPIKEY'
#!/bin/bash
read -s KEY
curl -k -s "http://localhost:7733/api/v1/mining/start/${KEY// /%20}?api_key=YOURAPIKEY"
sleep 2
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' 'http://localhost:7733/api/v1/mining/info?api_key=YOURAPIKEY'