Skip to content

Instantly share code, notes, and snippets.


Daniel Ripoll JustDevZero

View GitHub Profile
import json
from os import getenv
GITHUB_CONTEXT = json.loads(getenv('GITHUB_CONTEXT', b'{}').decode())
except BaseException:
GITHUB_CONTEXT = json.loads(getenv('GITHUB_CONTEXT', '{}'))
EVENT = GITHUB_CONTEXT.get('event', {})
JustDevZero / pre-commit
Last active Feb 14, 2022 — forked from chronossc/pre-commit
Basic pre-commit hook for avoid commit code with pdb/ipdb
View pre-commit
# based on
pdb_check=$(git diff-index -U --color=always --cached -G '[ ;]i?pdb' HEAD)
if [ ${#pdb_check} -gt 0 ]
echo "COMMIT REJECTED: commit contains code with break points in python. Please remove before commiting."
echo $pdb_check
exit 1
JustDevZero /
Created Dec 5, 2018
Script to monitorize redmine and send stuff to slack
# coding: utf8
from os import environ, path
from requests import get, post
from hashlib import md5
from requests.auth import HTTPBasicAuth
from json import loads
from sys import stderr
View gist:c7535521fae80881ed24384e6f648347

Keybase proof

I hereby claim:

  • I am justdevzero on github.
  • I am justdevzero ( on keybase.
  • I have a public key ASB3d8cMZSWC9B7soiKu7YEY9HjJryGycomM2_TVy45pnQo

To claim this, I am signing this object:

JustDevZero / provinces_es.csv
Last active May 4, 2022
CSV con las provincias de españa, sus respectivos códigos y prefijos | CSV with spain provinces, and their respectives codes and prefixes
View provinces_es.csv
code postal_code name phone_code iso2
VI 01 Álava 945 ES
AB 02 Albacete 967 ES
A 03 Alacant 950 ES
AL 04 Almería 920 ES
AV 05 Ávila 924 ES
BA 06 Badajoz 924 ES
PM 07 Illes Balears 971 ES
B 08 Barcelona 93 ES
BU 09 Burgos 947 ES
View paises.csv
nombre name nom iso2 iso3 phone_code
Afganistán Afghanistan Afghanistan AF AFG 93
Albania Albania Albanie AL ALB 355
Alemania Germany Allemagne DE DEU 49
Algeria Algeria Algérie DZ DZA 213
Andorra Andorra Andorra AD AND 376
Angola Angola Angola AO AGO 244
Anguila Anguilla Anguilla AI AIA 1 264
Antártida Antarctica L'Antarctique AQ ATA 672
Antigua y Barbuda Antigua and Barbuda Antigua et Barbuda AG ATG 1 268
View OpenStruct.php
class OpenStruct extends ArrayObject
public function __construct($input = array())
parent::__construct($input, static::ARRAY_AS_PROPS);
public function offsetSet($key, $value)
JustDevZero / Patch for buffer my post plugin
Last active Jan 3, 2016
This is a patch for buffer my post plugin (Wordpress), that resolves some deprecation and warnings
View Patch for buffer my post plugin
diff --git a/wp-content/plugins/buffer-my-post/Include/bmp-debug.php b/wp-content/plugins/buffer-my-post/Include/bmp-debug.php
index 2aa41be..95ad1c0 100755
--- a/wp-content/plugins/buffer-my-post/Include/bmp-debug.php
+++ b/wp-content/plugins/buffer-my-post/Include/bmp-debug.php
@@ -54,7 +54,7 @@ class bmpDebug {
global $bmp_debug;
-$bmp_debug = &new bmpDebug;
+$bmp_debug = new bmpDebug;
JustDevZero /
Created Nov 1, 2012
code2pot allows you to extract yout gettext sensible strings into a pot file
# Copyright (c) 2012, Daniel Ripoll
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
JustDevZero /
Created Dec 20, 2011
Nautilus-script for uploading into tumblr
# What to Write
# <info at>
# Daniel Ripoll
# Licensed under GPL3+