Skip to content

Instantly share code, notes, and snippets.

View marcus7777's full-sized avatar
:octocat:
Working from bike

Marcus Hitchins marcus7777

:octocat:
Working from bike
View GitHub Profile
alias cd..='cd ..'
alias cp='cp -i'
alias d='ls'
alias df='df -h -x supermount'
alias du='du -h'
alias egrep='egrep --color'
alias fgrep='fgrep --color'
alias grep='grep --color'
alias l='ls'
alias la='ls -a'
function importKey (KeyAsJson, cb) {
var key = JSON.parse(KeyAsJson)
var hard = key.hard ? new RegExp(key.hard, 'g') : ''
return window.crypto.subtle.importKey('jwk', key, {name: 'ECDSA', namedCurve: 'P-256'}, false, key.key_ops).then(function (key) {
return cb(key, hard)
}).then(function (ret) {
return ret
}).catch(function (e) {
console.error(e)
function importKey (KeyAsJson, cb) {
var key = JSON.parse(KeyAsJson)
var hard = key.hard ? new RegExp(key.hard, 'g') : ''
return window.crypto.subtle.importKey('jwk', key, {name: 'ECDSA', namedCurve: 'P-256'}, false, key.key_ops).then(function (key) {
return cb(key, hard)
}).then(function (ret) {
return ret
}).catch(function (e) {
console.error(e)
let 𝚽 = Φ = (1+Math.sqrt(5))/2
let φ = Φ - 1

Keybase proof

I hereby claim:

  • I am marcus7777 on github.
  • I am marcus7777 (https://keybase.io/marcus7777) on keybase.
  • I have a public key ASB9i03bVfOxVLA2wRcwSBM_6Svyw3qgLGFFhsi67rFtRAo

To claim this, I am signing this object:

sudo apt update && sudo apt install xz-utils firefox-esr -y
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get install -y nodejs
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23E7166788B63E1E
sudo apt update -y && sudo apt install yarn -y
yarn global add firebase-tools
yarn global add @vue/cli
echo "# yarn" >> ~/.profile
@marcus7777
marcus7777 / gunMsging.js
Created August 26, 2019 07:29
gunMsging.js
//Alice's Side
var sharedKey = SEA.secret(BobePub, myPair (access via gun._.SEA))
var encMessage = SEA.encrypt(msg, sharedKey)
//on other side, Bob
var sharedKey = SEA.secret(AliceEPub, Bob.pair)
var decryptMessage = SEA.decrypt(encMessage, sharedKey)
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<style>
canvas {
position: absolute;
top: 45%;
left: 50%;
@marcus7777
marcus7777 / listAllEventListeners.js
Created September 20, 2018 06:41 — forked from dmnsgn/listAllEventListeners.js
List all event listeners in a document
const listeners = (function listAllEventListeners() {
let elements = [];
const allElements = document.querySelectorAll('*');
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
for (let i = 0; i < allElements.length; i++) {
const currentElement = allElements[i];
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX28mjE1NuFaIY7gIP0ytIi+yMKBQS8p5L1b1OXs/kOVHiLXASbMHAbt6cxIjDkYjHcE6O1YD9nBDU07uRYIRagsVyaepkA6F8Evt5acMKtJziVsJrKW/4LQYA7SL/qlZy2ENUK7vwUBRI1+TFG1Ph7SUSjL5pjxJakeW5hMYSRXb844FsI4LTRaXDcJv83hkwS/B8SoyhG+XOgB1hHNqNf58LALDKtSAWvv5n02SO5j20RBm41vBsVV8JZoLMX+ygNhJk5x8KnoKypBFm+Up3SshgIcX7CaUXAAfnOouH0VLMmv5AcIW3yvSN0+YzaMMrYceUAC7vkwYpAiR7+fNB marcus@cli