Skip to content

Instantly share code, notes, and snippets.

View xusy2k's full-sized avatar

Xus Zoyo xusy2k

View GitHub Profile
@eduherraiz
eduherraiz / hookcow
Last active June 23, 2017 08:00
Git hook to show a random fortune message using random cowsay on fridays
#!/bin/bash
# System Dependencies
# sudo apt install fortune cowsay toilet
if [[ $(date +%u) -eq 5 ]] ; then
MESSAGE='FRIDAY AT APSL'
COW_STATUS=`shuf -n1 -e b d g p s t w y`
COWFILES=`cowsay -l | grep -v files`
COWFILE=`shuf -n1 -e $COWFILES`
echo "-- $MESSAGE --" | toilet --gay -f future
fortune -s -n 80 fortunes | cowsay -$COW_STATUS -f $COWFILE | toilet --gay -f term
@amatellanes
amatellanes / celery.sh
Last active April 19, 2024 11:31
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream