Skip to content

Instantly share code, notes, and snippets.

View gsavovski's full-sized avatar

Goran Savovski gsavovski

View GitHub Profile
@gsavovski
gsavovski / TM_hide_cassettes_in_git_diffs
Created March 23, 2014 03:09
Hide cassettes in github diffs (tampermonkey script for chrome)
// ==UserScript==
// @name Hide cassettes in github diffs
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description Hide cassettes in github diffs
// @match https://github.com/*
// @copyright 2014+, Goran Savovski
// ==/UserScript==
// @require http://code.jquery.com/jquery-latest.js
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@gsavovski
gsavovski / VimChi - June 25th 2014 - Hashrocket
Last active August 29, 2015 14:02
Unite.vim Talk - VimChi - June 25th 2014 - Hashrocket
Unite.vim
===============================================
These are takeaways from the VimChi talk on Unite.vim.
This gist serves as easy copy paste resource when experimenting
with Unite, so that I can save you from taking notes in
the talk.
For more specific configuration with mapping and such,
you can checkout my .vimrc: github.com/gsavovski/VimplifY
@gsavovski
gsavovski / gist:ecb7c32e4fac13766baf
Last active August 29, 2015 14:08
Use signal.Notify to catch signals
package main
import (
"log"
"os"
"os/signal"
"syscall"
"time"
)
@gsavovski
gsavovski / gist:79e8aee4115b144b2df6
Created October 28, 2014 21:37
Why the lenght of a channel without initialized capacity is 0?
package main
import "fmt"
import "time"
func main() {
c := make(chan int)
go func() {
for i := 0; i < 10; i += 1 {
@gsavovski
gsavovski / gist:c214832e23b6c00af43d
Created October 29, 2014 20:10
Conditionally build a package only matching the test flag from the command line
// +build test
package eventspipeline
import "fmt"
import . "go/build"
func init() {
fmt.Println(Default)
fmt.Println(Default)
@gsavovski
gsavovski / gist:692c38c656f6b8555dab
Created October 31, 2014 03:30
Internal struct variables when casting to an interface
// Variables accesible directly on the structure
// but after casted to a interface, still accesible
// for the implementing methods thought
package main
import "fmt"
type Animal interface{
Speak() string