Skip to content

Instantly share code, notes, and snippets.

View gerardobort's full-sized avatar
🏔️

Gerardo Bort gerardobort

🏔️
View GitHub Profile
@IanColdwater
IanColdwater / twittermute.txt
Last active March 8, 2026 00:11
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@martjanz
martjanz / Junar downloader.ipynb
Last active December 27, 2017 13:46
Junar data downloader
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MikeBild
MikeBild / async-either-with-promise.js
Last active November 10, 2018 15:40
Async Railway Oriented Programming in JS
#!/bin/env node
//thx to http://fsprojects.github.io/Chessie/a-tale-of-3-nightclubs.html
Promise.all([
suitablePersonEnterGayBar(),
unsuitablePersonEnterGayBar(),
])
.then(result => result.map((person, i) => `Person ${i+1}: ${person.cost || ''}${person.reasons.join(' ')}`))
.then(result => console.log(`Person entries\n${result.join('\n')}`));
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active March 21, 2026 02:30
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@amatellanes
amatellanes / celery.sh
Last active September 19, 2025 15:58
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.#'),
@neara
neara / Procfile
Created April 23, 2014 13:21
Celery Multiple Queues Setup
web: run-program gunicorn arena.wsgi
celery_beat: run-program celery -A arena beat -l info
celery1: run-program celery -A arena worker -Q default -l info --purge -n default_worker
celery2: run-program celery -A arena worker -Q feeds -l info --purge -n feeds_worker
@romainl
romainl / gist:9970697
Last active September 27, 2025 02:49
How to use Tim Pope's Pathogen

How to use Tim Pope’s Pathogen

I’ll assume you are on Linux or Mac OSX. For Windows, replace ~/.vim/ with $HOME\vimfiles\ and forward slashes with backward slashes.

The idea

Vim plugins can be single scripts or collections of specialized scripts that you are supposed to put in “standard” locations under your ~/.vim/ directory. Syntax scripts go into ~/.vim/syntax/, plugin scripts go into ~/.vim/plugin, documentation goes into ~/.vim/doc/ and so on. That design can lead to a messy config where it quickly becomes hard to manage your plugins.

This is not the place to explain the technicalities behind Pathogen but the basic concept is quite straightforward: each plugin lives in its own directory under ~/.vim/bundle/, where each directory simulates the standard structure of your ~/.vim/ directory.

@konklone
konklone / simpleopenni-ubuntu.md
Last active December 26, 2015 17:39
How I got SimpleOpenNI working on Oct 27, 2013 in Ubuntu 13.10

Getting SimpleOpenNI working in Processing on Ubuntu 13.10

There's still obviously not a great, reliable installation path for SimpleOpenNI. But this is what worked for me (it got me to the point of the DepthImage example sketch working).

I visited the simple-openni installation page and followed its extra Linux instructions:

cd ~/Downloads
wget https://simple-openni.googlecode.com/svn/trunk/SimpleOpenNI-2.0/platform/linux/installLinuxRules.sh
wget https://simple-openni.googlecode.com/svn/trunk/SimpleOpenNI-2.0/platform/linux/primesense-usb.rules
@PieterJanVanAeken
PieterJanVanAeken / gist:6698581
Last active March 31, 2016 17:44
Issue Tracking in Neo4j
= Why JIRA should use Neo4j
== Introduction
There are few developers in the world that have never used an issue tracker. But there are even fewer developers who have ever used an issue tracker which uses a graph database. This is a shame because issue tracking really maps much better onto a graph database, than it does onto a relational database. Proof of that is the https://developer.atlassian.com/download/attachments/4227160/JIRA61_db_schema.pdf?api=v2[JIRA database schema].
Now obviously, the example below does not have all of the features that a tool like JIRA provides. But it is only a proof of concept, you could map every feature of JIRA into a Neo4J database. What I've done below, is take out some of the core functionalities and implement those.
== The data set
@extraordinaire
extraordinaire / reconnecting_pdo.php
Last active January 9, 2025 12:21
Reconnectable PDO
<?php
class ReconnectingPDO
{
protected $dsn, $username, $password, $pdo, $driver_options;
public function __construct($dsn, $username = "", $password = "", $driver_options = array())
{
$this->dsn = $dsn;
$this->username = $username;
$this->password = $password;