Skip to content

Instantly share code, notes, and snippets.

View miqui's full-sized avatar

Miguel Quintero miqui

View GitHub Profile
#!/bin/sh
set -e
#
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
# or:
# 'wget -qO- https://get.docker.com/ | sh'
#
# For test builds (ie. release candidates):
# 'curl -sSL https://test.docker.com/ | sh'
@miqui
miqui / 0_reuse_code.js
Created January 11, 2016 03:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@miqui
miqui / git-bash-prompt.bash
Created February 2, 2016 19:38 — forked from tdd/git-bash-prompt.bash
Bash prompt configuration for Git’s built-in prompt features
# STEP 1: ENSURE COMPLETION AND PROMPT FUNCTION ARE LOADED
# ========================================================
# OPTION 1: If on OSX using Homebrew:
#
# source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
# source $(brew --prefix)/etc/bash_completion.d/git-completion.bash
# OPTION 2: If on OSX using built-in Git (also works on ZSH):
#
@miqui
miqui / gitconfig.ini
Created February 2, 2016 19:40 — forked from tdd/gitconfig.ini
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status
@miqui
miqui / proxy-settings
Created March 7, 2016 19:02 — forked from denitram/proxy-settings
Proxy settings
#!/bin/bash
# Set proxy settings in Ubuntu for eclipse, maven and apt
#### variables
ECLIPSE_SETTINGS_DIR="/home/martine/apps/springsource/sts-3.4.0.M1/configuration/.settings/"
ECLIPSE_SETTINGS_FILE="org.eclipse.core.net.prefs"
ECLIPSE_SETTINGS_PROXY="org.eclipse.core.net.prefs-PROXY"
ECLIPSE_SETTINGS_NOPROXY="org.eclipse.core.net.prefs-NOPROXY"
ECLIPSE_SETTINGS=$ECLIPSE_SETTINGS_DIR$ECLIPSE_SETTINGS_FILE
@miqui
miqui / Remove Submodule
Created March 8, 2016 04:47 — forked from kyleturner/Remove Submodule
How to remove a submodule from a Github project
To remove a submodule you need to:
Delete the relevant line from the .gitmodules file.
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Commit and delete the now untracked submodule files.
@miqui
miqui / curl.md
Created March 25, 2016 17:11 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@miqui
miqui / create-swarm-virtualbox.sh
Created March 28, 2016 18:31 — forked from ioggstream/create-swarm-virtualbox.sh
Create a swarm with overlay network - virtualbox.
unset DOCKER_HOST DOCKER_MACHINE_NAME DOCKER_MACHINE_NAME DOCKER_TLS_VERIFY DOCKER_CERT_PATH
export SWARM_TOKEN=$(cat swarm.token)
echo $SWARM_TOKEN
CONSUL_IP=$(docker-machine ip consul)
_cluster="A"
_master=${_cluster}-0
_cert_home="$HOME/.docker/machine/machines/${_master}"
@miqui
miqui / swarm
Created March 28, 2016 18:33
Docker swarm by docker-machine
#!/bin/bash
## Docker swarm with docker-machine
sid=$(docker run swarm create)
docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://$sid swarm-master
docker-machine create -d virtualbox --swarm --swarm-discovery token://$sid swarm-node-01
docker-machine create -d virtualbox --swarm --swarm-discovery token://$sid swarm-node-02
docker-machine create -d virtualbox --swarm --swarm-discovery token://$sid swarm-node-03
eval "$(docker-machine env --swarm swarm-master)"
#docker info
@miqui
miqui / flowtoken
Created June 16, 2016 21:21 — forked from quintessence/flowtoken
Flowdock integration
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.41
Comment: https://keybase.io/crypto
wcBMA0iHLnIGQf44AQgAzihYYhzGK7pTu89yUGGYVlga0o1DS+SqiRyLaMM0+PK2
BMcSEkfE9CW/5G1WnKCjlZNy1cfPdn2IPok8UCHwgh3QPyj35NaSNTXN0FcG5f23
y10sOBTqxlMKZK2FdhtNBZKwX/+jyHMEEDhxfuQu8TwR4iUcA42ISsXEzYUuUaw0
IJfEbs9b4lbo6VmqXQoIVqLB0r8KgrV3xahysaTDNfuNJgoRuYvVQSDIpNdqWzMy
nZFR4XiR6EPXjpMRSwloR6W/GX4eMhyqVadHMptbK5gmzzxwDox9cvI/DuUVxxb3
gipuPUdM0jczBMxKRlvqXoLMqSiNG5/ssGfvJQuypcHATANsO7/IBaX31AEIALP6