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
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM | |
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU | |
# | |
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances) | |
# | |
ssh -i <your private key.pem> ec2-user@<your public ip address> | |
# | |
# On the Mac |
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
#!/bin/bash | |
# Setup Ledger Nano S in Linux | |
# according to http://support.ledgerwallet.com/knowledge_base/topics/ledger-wallet-is-not-recognized-on-linux | |
# However, in Fedora, the "plugdev" group is not existed (obsolete). | |
# The solution is to replace `GROUP=\"plugdev\"` to `OWNER=\"<username>\"` in the script, for example: | |
# Original rule: SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", GROUP="plugdev" | |
# Change to: SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", OWNER="ptantiku" | |
wget -q -O - https://www.ledgerwallet.com/support/add_udev_rules.sh | sed -re 's/GROUP=\\"plugdev\\"/OWNER=\\"'$(whoami)'\\"/' | sudo bash |
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
// Navigate to https://github.com/watching and then run: | |
// Taken from: https://stackoverflow.com/questions/11043374/how-to-unwatch-multiple-repos-easily-on-github | |
Array.prototype | |
.slice.apply(document.querySelectorAll('.js-subscription-row')) | |
.forEach(el => { const org = el.querySelector('a[href^="/YOUR_ORG"]'); if (org) el.querySelector('button').click()}); |
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 Crypto.Random | |
from Crypto.Protocol import KDF | |
from google.appengine.ext import ndb | |
from datetime import datetime | |
class Credentials(ndb.Model): | |
"""Credentials to authenticate a person. | |
""" | |
# --- Class Variables --- | |
# Our pseudo-random stream - used for generating random bits for the |
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 XML at http://www.w3.org/Math/characters/unicode.xml | |
# XSL for conversion: https://gist.github.com/798546 | |
unicode_to_latex = { | |
u"\u0020": "\\space ", | |
u"\u0023": "\\#", | |
u"\u0024": "\\textdollar ", | |
u"\u0025": "\\%", | |
u"\u0026": "\\&", |