Skip to content

Instantly share code, notes, and snippets.

View ik5's full-sized avatar
🎯
Focusing

ik5 ik5

🎯
Focusing
View GitHub Profile
@alecthegeek
alecthegeek / go-install-tools
Last active September 3, 2015 18:18
Set up a "standard" go project workspace with support for 3rdparty modules, version control repo and a template main package
# Install all the Go tools and godep tool
# Location of gobin is based on installation by OS X Homebrew
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u golang.org/x/tools/cmd/...
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u github.com/tools/godep
{$mode objfpc}{$M+}
program test;
type
TMyClass = class
// Must be with RTTI view
procedure SayHi;
end;
procedure TMyClass.SayHi;
@zecar
zecar / Javascript Array betterFilter.md
Last active April 20, 2017 21:27
javascript array.filter faster alternative
Array.prototype.betterFilter = function(expression) {
	var res = [];
	for(var idx=0; idx<this.length; idx++){
		var currentItem = this[idx];
		if(expression(currentItem)){
			res.push(currentItem);
		}
	}
	return res;
@sharvit
sharvit / BreadcrumbBar.md
Last active April 26, 2018 10:14
BreadcrumbBar toturial

BreadcrumbBar

breadcrumb-bar-2

Breadcrumbs display a users location within an application hierarchy. They act as a resource to help users navigate more efficiently and provide additional context.

The Breadcrumb Switcher provides a shortcut for users to quickly navigate to parallel pages, rather than navigating back to the previous page and making a new selection.

@johnpmitsch
johnpmitsch / react.md
Last active July 10, 2018 03:21
React/Redux Katello walkthrough resources
@jonmorehouse
jonmorehouse / vimrc
Created January 15, 2014 19:09
UUID generator for vim. Inputs a uuid to copy buffer
fu! GenerateUUID()
python << EOF
import uuid
import vim
# output a uuid to the vim variable for insertion below
vim.command("let generatedUUID = \"%s\"" % str(uuid.uuid4()))
EOF
@larssmit
larssmit / .gvimrc.before
Last active February 18, 2019 10:16
My MacVim settings
" -----------------------------------------------------------------------------
" VIM Configuration for Janus (https://github.com/carlhuda/janus.git)
" Lars Smit larssmit@me.com
" -----------------------------------------------------------------------------
" -----------------------------------------------------------------------------
" Basics
" -----------------------------------------------------------------------------
set encoding=utf8
@milosgajdos
milosgajdos / gist:296fb90d076f259a5b0a
Last active March 12, 2019 05:34
Add a MAC VLAN interfaces into Docker from the host machine
package main
import (
"fmt"
"log"
"net"
"github.com/milosgajdos83/tenus"
)
@zaydek-old
zaydek-old / howto
Last active July 21, 2019 07:04
Proof-of-concept for SQL-driven logging. You can like this tweet for updates: https://twitter.com/username_ZAYDEK/status/1114827120524419073
bash$ pg_ctl -D /usr/local/var/postgres start ## init postgres
bash$ psql -d postgres ## connect to postgres
psql# create database logger; -- create a database named "logger"
psql# begin; -- start a transaction
psql# \i log.sql -- load database
psql# commit; -- commit the transaction
bash$ go run log.go ## run driver program
@milosgajdos
milosgajdos / gist:9f68b1818dca886e9ae8
Last active December 1, 2019 23:28
Add a VLAN interfaces into Docker from the host machine
package main
import (
"fmt"
"log"
"net"
"github.com/milosgajdos83/tenus"
)