Skip to content

Instantly share code, notes, and snippets.

View mudphone's full-sized avatar

Kyle Oba mudphone

View GitHub Profile

Update System

  • sudo apt-get update
  • sudo apt-get install emacs

Pyenv

  • git clone https://github.com/pyenv/pyenv.git ~/.pyenv
  • echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
  • echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
  • echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.profile
  • log out and back in

OpenCV V4 on Raspberry Pi 4, Buster

Why and How

# Our .tmux.conf file
# Setting the prefix from C-b to C-a
# START:prefix
#set -g prefix C-]
set -g prefix 'C-\'
# '<--Need this quote for emacs syntax highlight bug
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
@mudphone
mudphone / socks_sftp.py
Created April 17, 2018 08:35 — forked from ryanhiebert/socks_sftp.py
SFTP via SOCKS Proxy using Paramiko
import paramiko, socks
# PySocks recommends using no arguments,
# because it only supports the defaults anyway.
sock = socks.socksocket()
host, port = '127.0.0.1', 1234
# Set up your proxy information for this socket
sock.set_proxy(
@mudphone
mudphone / socks_sftp.py
Created April 17, 2018 08:35 — forked from ryanhiebert/socks_sftp.py
SFTP via SOCKS Proxy using Paramiko
import paramiko, socks
# PySocks recommends using no arguments,
# because it only supports the defaults anyway.
sock = socks.socksocket()
host, port = '127.0.0.1', 1234
# Set up your proxy information for this socket
sock.set_proxy(
(set-env!
:source-paths #{"src"}
:dependencies '[])
(require '[boot.core :as c]
'[clojure.java.io :as io])
(deftask my-count
@mudphone
mudphone / init.el
Created July 26, 2017 22:25
A sample init.el
(require 'package)
(setq package-archives
'(("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")
))
;; ("org" . "http://orgmode.org/elpa/")
(setq package-pinned-packages
@mudphone
mudphone / fn.swift
Last active December 2, 2016 01:49
public class Presence {
func adder(a: Int, b: Int) -> Int {
return a + b
}
func anotherAdder(addy: (Int, Int) -> Int = adder) -> Int {
return addy(4, 5) + 6
}
}
@mudphone
mudphone / DockerThings.md
Last active August 22, 2016 02:49
Docker Things

From Docker in Practice, by IAan Miell, Aidan Hobson Sayers

ping each running container

docker ps -q | xargs docker inspect --format='{{.NetworkSettings.IPAddress}}' | xargs -l1 ping -c1

use host's bash history

function basher() {
@mudphone
mudphone / Six.hs
Created July 25, 2016 03:15
Typeclass instances
module Six where
data TisAnInteger =
TisAn Integer
instance Eq TisAnInteger where
(==) (TisAn x) (TisAn x') =
x == x'
data TwoIntegers =