Skip to content

Instantly share code, notes, and snippets.

View yograterol's full-sized avatar

Yohan Graterol yograterol

View GitHub Profile
@yograterol
yograterol / [Docker] gist:ip
Last active August 29, 2015 14:05
Get container ip
docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${CID}
@yograterol
yograterol / [Docker] gist:port
Created August 8, 2014 13:30
Get port for expose private port
docker port ${CID} ${PORT}
@yograterol
yograterol / [Fedora] gist:gpg-server
Created August 8, 2014 13:45
Fedora GPG key server
Web app: http://keys.fedoraproject.org/
For tool: gpg --keyserver keys.fedoraproject.org --recv-keys 0x110810E9
@yograterol
yograterol / gist:6cce2edcd8c49743286c
Created August 12, 2014 16:01
[AWS] CORS AWS S3
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Content-*</AllowedHeader>
<AllowedHeader>Host</AllowedHeader>
</CORSRule>
</CORSConfiguration>
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
@yograterol
yograterol / gist:cinammon-cheat-sheet
Last active August 29, 2015 14:06
Cinnamon cheat sheet
# Workspaces
Change between workspaces -> Ctrl + Alt + [Arrows]
Move windows to another workspace -> Ctrl + Alt + Shift + [Arrows]
List the windows -> Ctrl + Alt + Down Arrow
@yograterol
yograterol / Hello world - Go lang
Created November 3, 2014 03:52
Hello world - Go lang
package main
import "fmt"
func main() {
fmt.Printf("Hola, mundo.\n")
}
yum install golang golang-vim
rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-12.rhel6.noarch.rpm
@yograterol
yograterol / goclean.sh
Last active August 29, 2015 14:19 — forked from h12w/goclean.sh
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 1. gofmt (http://golang.org/cmd/gofmt/)
# 2. goimports (https://github.com/bradfitz/goimports)
# 3. golint (https://github.com/golang/lint)
# 4. go vet (http://golang.org/cmd/vet)
# 5. race detector (http://blog.golang.org/race-detector)
# 6. test coverage (http://blog.golang.org/cover)
set -e