Skip to content

Instantly share code, notes, and snippets.

View rwxrob's full-sized avatar
🏠
Working from home

Rob Muhlestein rwxrob

🏠
Working from home
View GitHub Profile
@rwxrob
rwxrob / no-constructor.go
Last active July 29, 2018 15:17
Stop Using "Idiomatic" Constructors in Go (They Complicate Composition)
package main
import (
"encoding/json"
"fmt"
)
type Student struct {
Name string `json:"name"`
Age int `json:"age"`
@rwxrob
rwxrob / tmux.conf
Created January 26, 2018 22:02
One True Mac TMUX Config
new-session
unbind C-b
set -g prefix C-a
bind-key C-a last-window
set -g status off
bind | split-window -h
bind \ split-window -h
bind - split-window -v
bind _ split-window -v
@rwxrob
rwxrob / node-replit.js
Created December 5, 2017 22:29
Node REPL.it Fix
const readline = require('readline')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false // this is key
})
rl.on('line',line=>{console.log(line)})
@rwxrob
rwxrob / linkvscodesettings.sh
Created October 12, 2017 15:53
Linking VSCode Settings to Private Repo
cd ~/repos/private
mkdir vscode
cd vscode
mv ~/Library/Application\ Support/Code/User/settings.json .
cd ..
git add -A .
git commit -a -m "added vscode settings"
git push
cd ~/Library/Application\ Support/Code/User/
ln -s ~/repos/private/vscode/settings.json
@rwxrob
rwxrob / .gitignore
Last active October 7, 2017 14:55
Basic Python3 Story Game Engine
We couldn’t find that file to show.
@rwxrob
rwxrob / motd.py
Created February 24, 2017 22:36
CodeAnywhere Warning MOTD
#!/usr/bin/env python3
import skilstak.colors as c
import os
import pwd
import shutil
codeanywhere = [
"65.52.184.164",
"52.161.27.120",
@rwxrob
rwxrob / jsontime.go
Created February 22, 2017 14:18
Don't Mess with Default RFC3339Nano Format
package main
import (
"encoding/json"
"fmt"
"log"
"time"
)
type Some struct {
@rwxrob
rwxrob / id.go
Last active February 21, 2017 20:19
Easy IDs in Golang for Internet of Things (IPv6 scope) without UUID Hassle
import (
"crypto/rand"
//"encoding/hex"
"encoding/base64"
"io"
)
type Id []byte
type Something struct {
def hello(name='world'):
print("Hello {}".format(name))
@rwxrob
rwxrob / minecraft-commands.md
Last active August 29, 2015 14:06
The Minecraft Commands Covered in Class (in order)

(better sites out there for all the options, these are just the ones most common that we do in class)

Basic

  • /gamemode c - set to creative mode
  • /gamemode s - set to survival mode
  • /weather clear - stop the bad weather

Intermediate