Skip to content

Instantly share code, notes, and snippets.

View santiblanko's full-sized avatar
🎯
Focusing

santiblanko santiblanko

🎯
Focusing
View GitHub Profile
ssh root@remoteserver screen -d -m bash /path/to/script
@santiblanko
santiblanko / gist:9591755
Last active August 29, 2015 13:57
Tiene muy buena pinta, muy completo.
#!/usr/bin/env bash
#http://goo.gl/T2zC01
# Upgrade Base Packages
sudo apt-get update
sudo apt-get upgrade -y
# Install Web Packages
sudo apt-get install -y build-essential dkms re2c apache2 php5 php5-dev php-pear php5-xdebug php5-apcu php5-json php5-sqlite \
@santiblanko
santiblanko / gist:9700180
Last active August 29, 2015 13:57
Vagrant Probando...
1.Descargamos vagrant.
2.Instalamos.. siguiente -> siguiente ->
3.Creamos una carpeta.
4.vagrant init.
5.Añadimos un box, este contiene la imagen de la maquina virtual.
Podemos usar por ejemplo:
@santiblanko
santiblanko / gist:9718841
Last active August 29, 2015 13:57
Jugando con tmux
brew install tmux
tmux new -s development
Paneles
Ctrl-b %
Ctrl-b "
-------WWOOOOOWWWW----------
Ctrl-b q (Nos salen unos numeros que debemos apretar para cambiar de panel de forma sencilla)
Ctrl-b x desechar paneles...
http://es.wikipedia.org/wiki/M%C3%ADkonos
@santiblanko
santiblanko / serve
Last active August 29, 2015 13:57
serve.sh
echo "127.0.0.1 $1" >> "/etc/hosts"
vhost="<VirtualHost *:80>
ServerName $1
DocumentRoot /home/vagrant/virtuals/$2
<Directory \"/home/vagrant/virtuals/$2\">
Order allow,deny
Allow from all
Require all granted
AllowOverride All

Google Text to Speech API

Base URL: http://translate.google.com/translate_tts
It converts written words into audio. It accepts GET requests.

GET

q
The query string to convert to audio

tl
Translation language, for example, ar for Arabic, or en-us for English

mysqldump --opt --user="USERNAME" --password="PASSWORD" my-db > app/tests/_data/dump.sql
@santiblanko
santiblanko / phpunit.xml
Created April 13, 2014 00:47
Add to your ~/.bash_profile or similar [alias pc="wget http://goo.gl/jKRdGL && mv jKRdGL phpunit.xml"]
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
@santiblanko
santiblanko / .bash_profile
Last active August 29, 2015 13:59
My .bash_profile (blanco)
#Php
export PATH=/usr/local/php5/bin:$PATH
export PATH=$PATH:/Users/santiblanco/composer-packages/vendor/bin
#Composer
alias ci="composer install"
alias cu="composer update"
alias cc="wget http://goo.gl/PiOzT3 && mv PiOzT3 composer.json && composer install"
alias cdu="composer dump-autoload -o"