Delete remote branch:
git push origin :<branchName>
Add a remote branch:
git remote add <remoteName> <gitAddress>
$ gpg --gen-key | |
# 1) RSA and RSA (default) | |
# RSA keys may be between 1024 and 8192 bits long. | |
# You can set 'default-key $ID' in ~/.gnupg/gpg.conf | |
$ gpg --list-keys | |
$ gpg --list-secret-keys | |
$ gpg --export -a $ID > gpg-pubkey.asc | |
$ gpg --keyserver keys.gnupg.net --send-keys $ID |
type git # get the type of any command. Great for | |
# seeing if a command exists. | |
ls -t # sort by time, newest first | |
ls -tr # sort by time, oldest first | |
grep -r "test" FILE_OR_DIR # recursive full text search | |
grep -i "test" FILE # case insensitive | |
grep -c "pattern" FILE # count | |
grep -n "pattern" # show line numbers |
// Given previous tokens, predict the next token (and runners up) | |
let predictNextToken (previousKinds : SyntaxKind[]) : Prediction[] = | |
if ios11 then | |
let model : MLModel = model.Value // Load the cached model | |
let mutable predictions : Prediction[] = [| |] | |
// RNNs require external memory | |
let mutable lstm_1_h : MLMultiArray = null | |
let mutable lstm_1_c : MLMultiArray = null |
#!/usr/bin/python3 | |
# lives at: https://gist.github.com/bhepple/5c43e83e945a42297ba6433ee8ba88ce | |
# derived from: https://github.com/benkaiser/i3-wm-config | |
# $0 x y width height (-1 for unchanged) | |
import subprocess | |
import sys | |
import json |
<!-- $Header: /cvsroot/autodoc/autodoc/html.tmpl,v 1.4 2006/05/16 19:01:27 rbt Exp $ --> | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>Index for synapse</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<style type="text/css"> | |
BODY { |
# To use this, you need Python 3.5+ and pip. | |
# | |
# 1. Make a new Discord app with a bot. https://discordapp.com/developers/applications/ | |
# | |
# 2. Set environment variable SIMPLEWORDS_TOKEN on your computer to the bot's Token. | |
# Unix/Mac: export SIMPLEWORDS_TOKEN=MzABCDefghIJKLmnopQRSTuv.EnZ3kg.b5bdD74CKCr3du679hkemGJ7R7N | |
# PowerShell: $env:SIMPLEWORDS_TOKEN='MzABCDefghIJKLmnopQRSTuv.EnZ3kg.b5bdD74CKCr3du679hkemGJ7R7N' | |
# | |
# 3. Invite the bot to your server: https://stackoverflow.com/a/37743722/257418 | |
# |
#! /bin/sh | |
set -e | |
set -u | |
set -x | |
# configure this! | |
hostname="nixos" | |
password="abc123" | |
diskdev=/dev/sda |
/// A "fractional part" function on f32s that does bitwise magic | |
/// on the representation of its argument. | |
pub fn frac(f: f32) -> f32 { | |
f32::from_bits(_frac(f.to_bits())) | |
} | |
/// A "fractional part" function that operates on a signed integer | |
/// representation of an IEEE single-precision floating point number. | |
fn _frac(i: u32) -> u32 { | |
// A floating point number consists of a sign bit, |
#!/usr/bin/python3 | |
import sys | |
import os | |
import zipfile | |
import tempfile | |
from xml.etree import ElementTree | |
from shutil import copyfile | |
def stuffer(py_file, doc_file): |