Skip to content

Instantly share code, notes, and snippets.

View andru255's full-sized avatar
🇵🇪
:)

Andrés Muñoz andru255

🇵🇪
:)
View GitHub Profile
@andru255
andru255 / Dockerfile.fails
Created July 1, 2016 21:49 — forked from briceburg/Dockerfile.fails
docker - example adding www-data user to alpine images
FROM nginx:alpine
# stock verison from php:alpine image
# ensure www-data user exists
RUN set -x \
&& addgroup -g 82 -S www-data \
&& adduser -u 82 -D -S -G www-data www-data
# 82 is the standard uid/gid for "www-data" in Alpine
# http://git.alpinelinux.org/cgit/aports/tree/main/apache2/apache2.pre-install?h=v3.3.2
@andru255
andru255 / 0-react-hello-world.md
Created December 25, 2015 22:40 — forked from danawoodman/0-react-hello-world.md
React Hello World Examples
@andru255
andru255 / english-links.md
Created November 20, 2015 14:58 — forked from anareyna/english-links.md
English
@andru255
andru255 / functions.sh
Last active November 19, 2015 22:38 — forked from frontend-3/gist:360d9f15657139adba00
Bash para git pull y push en branch actual
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}
function gpull() {
echo "git pull origin $(current_branch)"
git pull origin $(current_branch)
}
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@andru255
andru255 / py2php.py
Last active August 29, 2015 14:22 — forked from reusee/py2php.py
import ast
from cStringIO import StringIO
import sys
INFSTR = '1e308'
def interleave(inter, f, seq):
seq = iter(seq)
try:
f(next(seq))

Install wine in linux

Type in your terminal

sudo apt-get install wine
sudo apt-get install winetricks
@andru255
andru255 / _readme.md
Last active August 29, 2015 14:15 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
#############################################
# 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
# serve all assets from CDN server
config.action_controller.asset_host = 'http://cdn.mydomain.com'
#or if your files in a folder on CDN server
config.action_controller.asset_host = 'http://cdn.mydomain.com/myfolder'
# serve only images
config.action_controller.asset_host = Proc.new { |source|
if source =~ /\b(.png|.jpg|.gif)\b/i