Skip to content

Instantly share code, notes, and snippets.

View luisivan's full-sized avatar
🦅
Fighting for freedom

Luis Cuende luisivan

🦅
Fighting for freedom
View GitHub Profile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
d5a097877b835c71581d1af86b333ffc5a207923bc2047c417e7af0c3d89dea5
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJZ8KPiCRDcWc9p8ZgB9QAANMQQAMNel3pJWZZcPDafUBsBdVcs
Q6q2thgK7cZoFdfqVg+6D+o7Cv7BvwaG8FDjlo4OO+Up+yzwzwFVnJ0daE6qsGoc
hx2gteNNX3S6qOY/muNcAviAb0UXqVFS034GLIM1WlFOILkvPVj8Ujpc16Zl/+1Y
ith2OfD/pwQcOCSeotF2BhjzTPyox+pbvun/veH7xfLE4Cwo8hFJWY5VUt9wI9Uf
@luisivan
luisivan / metamask-init.js
Created March 14, 2017 09:30
Injecting our MetaMask fork into an Electron dapp
const injectMetaMask = async () => {
const contentScriptReq = await fetch('metamask://app/scripts/contentscript.js')
const blob = await contentScriptReq.blob()
const s = document.createElement('script')
s.type = 'text/javascript'
s.src = URL.createObjectURL(blob)
document.getElementsByTagName('head')[0].appendChild(s)
return true
}
@luisivan
luisivan / metamask-protocol.js
Created March 14, 2017 09:33
Serving MetaMask our the metamask:// Electron custom protocol
// distPath can greatly vary. Just point it to where you want to serve MetaMask's build files
protocol.registerFileProtocol('metamask', (req, cb) => {
const filePath = req.url.replace('metamask://app/', '')
const distPath = (process.defaultApp) ? `${url.resolve(__dirname, '.metamask')}/dist/chrome/${filePath}` : path.resolve(`${__dirname}/metamask/${filePath}`)
cb({ path: distPath })
})
@luisivan
luisivan / touchegg.conf
Created November 20, 2016 03:08
Touchegg for Macbook Pro
<touchégg>
<settings>
<property name="composed_gestures_time">0</property>
</settings>
<application name="All">
<gesture type="DOUBLE_TAP" fingers="1" direction="">
<action type="MOUSE_CLICK">BUTTON=3</action>
</gesture>

Keybase proof

I hereby claim:

  • I am luisivan on github.
  • I am li (https://keybase.io/li) on keybase.
  • I have a public key ASBMBXw4dfxrIZYBXVd1zQtnBljisqNCZlBSh4CzuKZOjQo

To claim this, I am signing this object:

echo "Updating repositories" &&
apt-get -y update &&
echo "Intalling Git" &&
apt-get -y install git &&
echo "Installing requirements for building node extensions" &&
apt-get -y install build-essential &&
echo "Installing Node" &&
apt-get -y install python-software-properties &&
add-apt-repository ppa:chris-lea/node.js &&
apt-get -y update &&
@luisivan
luisivan / gtkdark.sh
Last active August 29, 2015 14:26
Sets GTK3 Dark theme variant on the focused window. I use it for Spotify and Atom
#!/bin/sh
sleep 1
id=`xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'`
xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark -id "$id"
@luisivan
luisivan / keybase.md
Created July 20, 2015 12:09
keybase.md

Keybase proof

I hereby claim:

  • I am luisivan on github.
  • I am li (https://keybase.io/li) on keybase.
  • I have a public key whose fingerprint is 97B1 D9CF 07FA 32ED F3BF AEDB 104A E21F BAA8 7B0A

To claim this, I am signing this object:

Verifying that +luisivan is my openname (Bitcoin username). https://onename.com/luisivan
This file has been truncated, but you can view the full file.
--------- beginning of /dev/log/system
I/Vold ( 275): Vold 2.1 (the revenge) firing up
D/Vold ( 275): Volume external state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 275): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 275): Volume sdcard state changing 0 (No-Media) -> 1 (Idle-Unmounted)
D/Vold ( 275): Volume sdcard state changing 1 (Idle-Unmounted) -> 2 (Pending)
D/Vold ( 275): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
W/Vold ( 275): Duplicate state (1)
W/Vold ( 275): Duplicate state (1)
W/Vold ( 275): Duplicate state (1)