Skip to content

Instantly share code, notes, and snippets.

View PabloCastellano's full-sized avatar
:octocat:

Pablo Castellano PabloCastellano

:octocat:
View GitHub Profile
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]
root@obeliskP:~# sudo bash /usr/local/src/obelisk-git/scripts/setup.sh
[+] Welcome to Obelisk worker and balancer daemon setup.
IMPORTANT: This script requires previous installation of
libbitcoin, libwallet and obelisk IN DEFAULT LOCATIONS.
INFO: Imported genesis block 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
--> ob user already exists: skipping...
ERROR: --> You need to have installed libbitcoin, sx and obelisk before run this script.
@PabloCastellano
PabloCastellano / gist:6b160939a4fb2a3b026f
Created January 2, 2015 11:09
User ob cannot run obelisk
root@obeliskP:~# su ob
ob@obeliskP:/root$ obworker
Using config file: "/etc/obelisk/worker.cfg"
Press CTRL-C to shut down.
DEBUG [worker]: Listening: tcp://*:9091
INFO [worker]: worker ready
DEBUG [worker]: Heartbeat: tcp://*:9092
terminate called after throwing an instance of 'boost::interprocess::interprocess_exception'
what(): Permission denied
Aborted (core dumped)
@PabloCastellano
PabloCastellano / get_constituciones.py
Last active December 30, 2015 09:14
Bormeparser: Obteniendo el campo Comienzo de operaciones del acto Constitución
import os
import bormeparser
BORME_JSON_ROOT = '/home/pablo/.bormes/json'
def find_constitucion(borme):
constituciones = []
for anuncio in borme.get_anuncios():
actos = list(anuncio.get_actos())

Keybase proof

I hereby claim:

  • I am pablocastellano on github.
  • I am pablog (https://keybase.io/pablog) on keybase.
  • I have a public key ASD57U1C9mkPrYyvbz13SQI5f5D457kMkCllsdKKvfB7cgo

To claim this, I am signing this object:

@PabloCastellano
PabloCastellano / libbitcoin_packages_ubuntu.sh
Created June 17, 2016 13:48
libbitcoin_packages_debian.sh
#
# libbitcoin version 2 Debian packaging script
# Tested on Debian 8.3
#
export PACKAGES_DIR=$HOME
cd $PACKAGES_DIR
apt-get install sudo
sudo apt-get install -y libtool autoconf make pkg-config libtool-bin devscripts dh-autoreconf git quilt
@PabloCastellano
PabloCastellano / gist:0ca1b35d67c064b397141cafd5d111ca
Last active June 22, 2017 19:26
Flashing pmOS into Moto G 2014 (titan)
pablo@pablo-sch ~/src/pmbootstrap $ ./pmbootstrap.py flasher flash_system
[20:40:33] (native) flash system image
(bootloader) has-slot:system: not found
target reported max download size of 536870912 bytes
Invalid sparse file format at header magi
sending sparse 'system' 1/1 (210933 KB)...
OKAY [ 7.412s]
writing 'system' 1/1...
OKAY [ 10.429s]
finished. total time: 17.840s
@PabloCastellano
PabloCastellano / gist:eb2e6e2ab4568c3f60fa921ba04dfc10
Created June 22, 2017 20:48
postmarketOS: dmesg after show_splash in Moto G 2014 (titan)
[ 149.230230,0] mdss_fb_alloc_fb_ion_memory: alloc 0x398000B vaddr = e7799000 (0x00200000 iova) for fb0
[ 149.230422,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.230693,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.230879,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.231060,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.231178,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.231357,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.231474,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.231655,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
[ 149.231773,0] vm_start=b6abd000 vm_end=b6e55000 vm_page_prot=1799
@PabloCastellano
PabloCastellano / prompts.md
Last active June 6, 2018 22:09
GitHub prompts

Prompts

Prompt #1

  • Company: Acme Computers Inc.
  • Version Control platform(s): Many GitHub Enterprise instances installed throughout the company by different teams. Acme Computers is trying to standardize on GitHub Enterprise and consolidate their GitHub usage onto a single instance. The company has many instances of other Git hosting solutions installed as well. Some are fully supported applications. Other instances are on machines under peope's desks.
  • Performance: The single instance of GitHub Enterprise occassionally has reports from users of being slow. There are 5,000 of the likely 20,000 total users on the instance at this point. There are a few problematic repositories that seem especially slow. One repository was shrunk from 70GB as a Subversion repository to 7GB as a Git repository after some cleanup. However, this repository is still taking very long to clone and for other simple Git operations.
  • Customer requests:

Acme wants GitHub to help them shrink the large repository to a more man

@PabloCastellano
PabloCastellano / dump.sh
Last active January 20, 2019 19:39 — forked from andsens/dump.sh
Backup all MySQL databases into separate files
#!/bin/sh
## backup each mysql db into a different file, rather than one big file
## as with --all-databases. This will make restores easier.
## To backup a single database simply add the db name as a parameter (or multiple dbs)
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is
## Create the user and directories
# mkdir -p /var/backups/mysql/databases
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup
## Remember to make the script executable, and unreadable by others