Skip to content

Instantly share code, notes, and snippets.

Avatar
👽
spilth.org

Brian Kelly spilth

👽
spilth.org
View GitHub Profile
@spilth
spilth / pointers.go
Created Aug 27, 2018
Pointers in Go
View pointers.go
package main
import (
"fmt"
)
func main() {
// Create variable i that holds an integer value
var i int
@spilth
spilth / go-unit-testing.md
Last active Aug 3, 2018
Unit Testing in Go
View go-unit-testing.md

Unit Testing in Go

Install Go

$ brew install golang
$ export GOPATH="$HOME/go"
$ export GOBIN="$GOPATH/bin"
$ export PATH="$GOBIN:$PATH"
@spilth
spilth / go-web-outside-in.md
Last active Aug 6, 2018
Outside In Web Development with Go
View go-web-outside-in.md

Outside In Web Development with Go

I'd like to build a simple web application in Go using Outside In Testing. This means starting by writing a test that pretends to be a user visiting the application and setting up expectations about what they should be seeing.

We'll be using the following:

  • Agouti - an acceptance testing framework
  • Gingko - a BDD-style testing framework
  • Gomega - a matcher/assertion library
@spilth
spilth / jira-url-to-markdown-url.js
Created May 4, 2018
Turn your currently open JIRA issue into a Markdown link for GitHub PRs
View jira-url-to-markdown-url.js
javascript:!function(a){var b=document.createElement("textarea"),c=document.getSelection();b.textContent=a,document.body.appendChild(b),c.removeAllRanges(),b.select(),document.execCommand("copy"),c.removeAllRanges(),document.body.removeChild(b)}("["+document.title+"]("+document.URL+")");
@spilth
spilth / django.md
Created Apr 5, 2018
Django Cheatsheet
View django.md

Django Cheatsheet

Install Python

$ brew install pyenv
$ eval "$(pyenv init -)"
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ pyenv install --list
$ pyenv install 2.7.14
@spilth
spilth / rubymine-overview.md
Last active Feb 16, 2018
RubyMine Overview
View rubymine-overview.md
  • Command + Shift + O = open file/class
    • Fuzzy Finder
  • Command + Shift + T = Navigate between test and implementation
    • Move Right...
  • Code Navigation
    • Command + Click class/variable
    • Option + Up/Down Arrow = Increase/Decrease Text Selection
    • Option + Shift + Up/Down Arrow = Move Code Up/Down
  • Refactoring Shortcuts
    • Shift + F6 = Rename Class/Method/Variable/File
@spilth
spilth / vsc-preferences.cson
Last active Jan 8, 2018
Visual Studio Code Preferences
View vsc-preferences.cson
{
// My eyes are old
"editor.fontSize": 16,
// Save files when they lose focus
"files.autoSave": "onFocusChange",
// Bump up the UI (my eyes are old)
"window.zoomLevel": 1,
@spilth
spilth / android-emulator-homebrew.sh
Last active Apr 5, 2021
Android Emulator with Homebrew
View android-emulator-homebrew.sh
touch ~/.android/repositories.cfg
brew cask install caskroom/versions/java8
brew cask install android-sdk
brew cask install intel-haxm
brew install qt
export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
sdkmanager "platform-tools" "platforms;android-27" "extras;intel;Hardware_Accelerated_Execution_Manager" "build-tools;27.0.0" "system-images;android-27;google_apis;x86" "emulator"
avdmanager create avd -n test -k "system-images;android-27;google_apis;x86"
/usr/local/share/android-sdk/tools/emulator -avd test