Skip to content

Instantly share code, notes, and snippets.

View JustDevZero's full-sized avatar

Daniel Ripoll JustDevZero

View GitHub Profile
@JustDevZero
JustDevZero / provinces_es.csv
Last active December 14, 2023 09:35
CSV con las provincias de españa, sus respectivos códigos y prefijos | CSV with spain provinces, and their respectives codes and prefixes
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
@JustDevZero
JustDevZero / pre-commit
Last active February 14, 2022 15:19 — forked from chronossc/pre-commit
Basic pre-commit hook for avoid commit code with pdb/ipdb
#!/bin/bash
# based on http://www.snip2code.com/Snippet/165926/Check-for-ipdb-breakpoints-git-hook
pdb_check=$(git diff-index -U --color=always --cached -G '[ ;]i?pdb' HEAD)
if [ ${#pdb_check} -gt 0 ]
then
echo "COMMIT REJECTED: commit contains code with break points in python. Please remove before commiting."
echo $pdb_check
exit 1
else
@JustDevZero
JustDevZero / autoguess.py
Last active May 20, 2021 21:10
autoguess
import json
from os import getenv
try:
GITHUB_CONTEXT = json.loads(getenv('GITHUB_CONTEXT', b'{}').decode())
except BaseException:
GITHUB_CONTEXT = json.loads(getenv('GITHUB_CONTEXT', '{}'))
EVENT = GITHUB_CONTEXT.get('event', {})
@JustDevZero
JustDevZero / redminer.py
Created December 5, 2018 17:59
Script to monitorize redmine and send stuff to slack
#!/home/dripoll/.env/redminer/bin/python
# 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

Keybase proof

I hereby claim:

  • I am justdevzero on github.
  • I am justdevzero (https://keybase.io/justdevzero) on keybase.
  • I have a public key ASB3d8cMZSWC9B7soiKu7YEY9HjJryGycomM2_TVy45pnQo

To claim this, I am signing this object:

@JustDevZero
JustDevZero / Patch for buffer my post plugin
Last active January 3, 2016 09:09
This is a patch for buffer my post plugin (Wordpress), that resolves some deprecation and warnings
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
JustDevZero / code2pot.sh
Created November 1, 2012 17:22
code2pot allows you to extract yout gettext sensible strings into a pot file
#!/bin/sh
# 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
JustDevZero / tumblrize.sh
Created December 20, 2011 00:58
Nautilus-script for uploading into tumblr
#!/bin/sh
#
# What to Write
#
# <info at danielripoll.es>
# Daniel Ripoll
# http://www.danielripoll.es
# http://ociolinux.blogspot.com/
# Licensed under GPL3+
@JustDevZero
JustDevZero / paises.csv
Last active August 29, 2015 14:22 — forked from brenes/README.md
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
<?php
class OpenStruct extends ArrayObject
{
public function __construct($input = array())
{
parent::__construct($input, static::ARRAY_AS_PROPS);
}
public function offsetSet($key, $value)
{