<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node
Important: your node location may vary. Use which node
to find it, or use it directly in the command:
def generate_RSA(bits=2048): | |
''' | |
Generate an RSA keypair with an exponent of 65537 in PEM format | |
param: bits The key length in bits | |
Return private key and public key | |
''' | |
from Crypto.PublicKey import RSA | |
new_key = RSA.generate(bits, e=65537) | |
public_key = new_key.publickey().exportKey("PEM") | |
private_key = new_key.exportKey("PEM") |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |
Sometimes you need to keep two upstreams in sync with eachother. For example, you might need to both push to your testing environment and your GitHub repo at the same time. In order to do this simultaneously in one git command, here's a little trick to add multiple push URLs to a single remote.
Once you have a remote set up for one of your upstreams, run these commands with:
git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]
Once set up, git remote -v
should show two (push) URLs and one (fetch) URL. Something like this:
[~] rofi -dump-xresources | |
The script command 'window' has 1 options, but needs 2: <name>:<script>. | |
Invalid script switcher: window | |
! Enabled modi | |
rofi.modi: window,run,ssh | |
! Window opacity | |
rofi.opacity: 100 | |
! Window width | |
rofi.width: 50 | |
! Number of lines |
/** | |
* Making promises | |
*/ | |
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok")); | |
/* Simpler promise creation for static values */ | |
Js.Promise.resolve("easy"); | |
Js.Promise.reject(Invalid_argument("too easy")); |
rofi.color-window: argb:EE373B47, #373B47 | |
rofi.color-normal: argb:00373B47, #737783, argb:00373B47, argb:00373B47, #f9f9f9 | |
rofi.color-urgent: argb:00373B47, #cc6666, argb:e54b5160, argb:00373B47, #f9f9f9 | |
rofi.color-active: argb:00373B47, #65acff, argb:e44b5160, argb:00373B47, #f9f9f9 | |
rofi.width: 30 | |
rofi.lines: 16 | |
rofi.font: Open Sans Light 25 | |
rofi.bw: 0 | |
rofi.padding: 40 | |
rofi.eh: 1 |