Skip to content

Instantly share code, notes, and snippets.


Chris Skudlarczyk chris-skud

View GitHub Profile
chris-skud / branch off feature branch
Last active Feb 3, 2022
Steps to manage a feature branch that has a dependency on another feature branch
View branch off feature branch
A--BC <-- master
B--C <-- feature-1
D--E <-- feature-2
after feature-1 merges into master, and whilst on feature-2 use:
`git fetch origin`
`git rebase --onto origin/master feature-1`
chris-skud / vscode_symbols.txt
Created Sep 17, 2018
fix vscode intellisense
View vscode_symbols.txt
Close all VS Code instances
Kill any running gocode process
Remove the gocode binary from your $GOPATH/bin and the corresponding code form $GOPATH/src/ or $GOPATH/src/
If you added the go.toolsGopath setting, then use that instead of the $GOPATH above
Open VS Code, run Go: Install/Update Tools, select gocode to install it
Ensure that you haven't disabled the go.installDependenciesWhenBuilding setting
Ensure all dependencies are built by running Go: Build Current Package (It uses the go build -i so all dependencies will be built and installed)
Now try the completions
chris-skud / copy_ReadCloser.go
Created Jan 7, 2018
retain value of read closer by copying, reading, re-setting.
View copy_ReadCloser.go
// source
var bodyBytes []byte
if c.Request.Body != nil {
bodyBytes, _ = ioutil.ReadAll(c.Request.Body)
// Restore the io.ReadCloser to its original state
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(bodyBytes))
// Use the content
bodyString := string(bodyBytes)
chris-skud / config-log.go
Last active Dec 1, 2017
log envconfig replacing sensitive values with stars
View config-log.go
package main
import (

Keybase proof

I hereby claim:

  • I am chris-skud on github.
  • I am cskud ( on keybase.
  • I have a public key whose fingerprint is D29A E245 B9F0 2419 981D F6A9 F4FF EAC3 67EF 5207

To claim this, I am signing this object:

chris-skud / gist:8a87bbe6be515c0d2783
Created Jun 9, 2015
shell curl parse json collection
View gist:8a87bbe6be515c0d2783
for json_val in $(curl -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer <secret>" https://thingthatreturnsjson | ./bin/ |
egrep '^\[\d*,"id"\]\s\d*' | cut -f 2); do echo $json_val; sleep 3; done
chris-skud /
Created Jan 12, 2015
whack docker containers and images
docker rm -f $(docker ps -aq)
docker rmi -f $(docker images -q)
chris-skud / exclude_inherited_methods.rb
Created Nov 2, 2014
Ruby exclude inherited methods
View exclude_inherited_methods.rb
> -
chris-skud / angular-console.js
Last active Aug 29, 2015
easy way to get at angular objects from dev tools console.
View angular-console.js
View angular-service-promise.js
function get() {
var prom = $http({method:'GET', url: 'test.json'})
.then(function(data) {
//set local value with returned data
vals = data;
// and return to caller so they can .then(function(data){})
return vals;