Skip to content

Instantly share code, notes, and snippets.

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

Andrés Muñoz andru255

🇵🇪
:)
View GitHub Profile
<?php
/**
* Define type of server
*
* Depending on the type other stuff can be configured
* Note: Define them all, don't skip one if other is already defined
*/
define( 'DB_CREDENTIALS_PATH', dirname( ABSPATH ) ); // cache it for multiple use
language: node_js
node_js:
- 0.6
- 0.7
- 0.8
- 0.9
- 0.10
before_script:
- npm install -g grunt-cli
- curl -L https://github.com/n1k0/casperjs/archive/1.0.3.tar.gz | tar xz
#!/usr/bin/python3.1
# This is script that extracts the trees of two commits to temporary
# directories and then runs meld on both directories, so you can compare
# them using meld's nice recursive browsing interface.
#
# This is for an answer to this question:
# http://stackoverflow.com/questions/2006032/view-differences-of-branches-with-meld
from subprocess import call, Popen, PIPE, check_call
# 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
#############################################
# 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
@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

Install wine in linux

Type in your terminal

sudo apt-get install wine
sudo apt-get install winetricks
@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))
# 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 / 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)
}