Skip to content

Instantly share code, notes, and snippets.

View modernell's full-sized avatar
🎯
Focusing

Pablo modernell

🎯
Focusing
View GitHub Profile
@modernell
modernell / post-receive
Created January 18, 2021 10:26 — forked from goidor/post-receive
Hook de Ejemplo para hacer deploy de aplicación en producción o en desarrollo
#!/bin/bash
### El script debe estar en la ruta .git/hooks/post-receive del servidor Git
while read oldrev newrev ref
do
if [[ $ref =~ .*/master$ ]]; then
echo "Push a $ref recibido. Procesando despliegue de rama $ref en Producción...."
git --work-tree=/srv/http/html --git-dir=/home/goidor/git/proyecto.git checkout -f master
elif [[ $ref =~ .*/develop$ ]]; then
echo "Push a $ref recibido. Procesando despliegue de rama $ref en Desarrollo...."
git --work-tree=/srv/http/html-develop --git-dir=/home/goidor/git/proyecto.git checkout -f develop
@modernell
modernell / post-receive.sh
Created January 18, 2021 08:32 — forked from benfrain/post-receive.sh
post-receive hook for multiple branches
#!/bin/bash
while read oldrev newrev ref
do
branch=`echo $ref | cut -d/ -f3`
if [ "master" == "$branch" ]; then
git --work-tree=./path/under/root/dir/live-site/ checkout -f $branch
echo 'Changes pushed live.'
fi
@modernell
modernell / scopes.txt
Created April 22, 2020 20:48 — forked from iambibhas/scopes.txt
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee