Skip to content

Instantly share code, notes, and snippets.

View miqui's full-sized avatar

Miguel Quintero miqui

View GitHub Profile
@miqui
miqui / gist:6d166490dfb9ac584f0f
Last active August 29, 2015 14:24
go refrelection
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@miqui
miqui / gist:e4f45fc250caffa31cc5
Created October 26, 2015 22:31
install docker and docker compose
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@miqui
miqui / gist:a18b81a5ae309901cca6
Created October 26, 2015 22:32
install docker (ubuntu)
wget -qO- https://get.docker.io/gpg | sudo apt-key add -
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
@miqui
miqui / gist:7a1db6fbdb03ea789c79
Last active October 26, 2015 22:34
Vagrant and latest ubuntu
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "public_network"
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
curl -sSL https://get.docker.com/ubuntu/ | sudo sh
SHELL
end
@miqui
miqui / gist:df32c8f91954486c961a
Created October 26, 2015 22:46
simple docker engine install
install new or upgrades to latest
curl -sSL https://get.docker.com/ | sudo bash
note:
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker your-user
Tree -L 1
.
| - HEAD # The git branch in which the project is currently in the
| - Config # project configuration information, git config command will change it
| - Description # description of project
| - Hooks / # system default hook scripts directory
| - Index # index file
| - History logs / # of each refs
| - Objects / # Git local repository for all objects (commits, trees, blobs, tags)
@miqui
miqui / gist:8787884f4f193a278b5a
Created October 27, 2015 00:37
git undo merge
Undoing a merge:
$ git pull $REMOTE $BRANCH
# uh oh, that wasn't right
$ git reset --hard ORIG_HEAD
# should be ok now...
http://nvie.com/posts/a-successful-git-branching-model/
https://github.com/sitaramc/gitolite
http://gitlabhq.com/
http://marklodato.github.com/visual-git-guide/index-en.html
http://gitimmersion.com/
http://try.github.com/levels/1/challenges/1
https://jellyjelly.net/blog/2012/05/04/our-git-development-workflow/
http://help.github.com/git-cheat-sheets/
http://gitref.org/
http://schacon.github.com/git/user-manual.html
http://viget.com/extend/effectively-using-git-with-subversion
http://viget.com/extend/a-gaggle-of-git-tips
http://john.albin.net/git/convert-subversion-to-git
http://help.github.com/import-from-subversion/
http://git.or.cz/course/svn.html
http://subgit.com/about/index.html
// Create a new branch and fetch frome remote branch
$ git checkout -b hotfix origin/hotfix
// Create a branch based one commit
// Fix branch
$ git checkout -b hotfix 7bda10c6488835f4c54079cec78cc539a0c152c6
$ git push origin hotfix
// Create a new branch hotfix based on master
$ git checkout -b hotfix master