Skip to content

Instantly share code, notes, and snippets.

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

Sion Williams willis7

🏠
Working from home
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@willis7
willis7 / clientDoGzip.go
Created January 13, 2017 13:52 — forked from mrosset/clientDoGzip.go
Client.Do will not uncompress response body
package main
// run this file with `go run clientDoGzip.go, and then file tmp.out to verify body is gzipped
import "compress/gzip"
import "net/http"
import "fmt"
import "io"
import "log"
import "os"
@willis7
willis7 / vagrant-cheat-sheet.md
Last active March 22, 2017 10:55 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Common Vagrant Commands

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
  • vagrant status -- outputs status of the vagrant machine
  • vagrant halt -- stops the vagrant machine
  • vagrant reload -- restarts vagrant machine, loads new Vagrantfile configuration
  • vagrant provision -- forces reprovisioning of the vagrant machine
@willis7
willis7 / AccountControllerTest.groovy
Created November 12, 2015 17:37 — forked from jeffsheets/AccountControllerTest.groovy
Spock test with Mocks of Spring MVC Rest Controller using standaloneSetup and mockMvc
import groovy.json.JsonSlurper
import org.springframework.test.web.servlet.MockMvc
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.http.HttpStatus.*
import spock.lang.Specification
/**
* A Spock Spring MVC Rest unit test that doesn't require a full spring context
*/
@willis7
willis7 / README.md
Created October 1, 2015 14:05 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

/* Groovy Usage:
The following example replaces:
the 1st occurrence of "James" in data.txt with "user1",
the 2nd occurrence of "James" in data.txt with "user2",
the 3rd occurrence of "James" in data.txt with "user3",
..
the 9th occurrence of "James" in data.txt with "user9".
*/
def myFile = new File("data.txt")

Open TortoiseGit > Settings, and click on Diff Viewer.

Under the Configure the program used for comparing different revisions of files section, select External, and add the following into the text box.

WinMergeU.exe /r /e /x /u /wl %base %mine

Click on Merge Tool to the left, select External, enter the following.