Skip to content

Instantly share code, notes, and snippets.

View JustDevZero's full-sized avatar

Daniel Ripoll JustDevZero

View GitHub Profile
@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 / 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)
{