Skip to content

Instantly share code, notes, and snippets.

Jorge Espada jespada

Block or report user

Report or block jespada

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View source-sid
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://deb.debian.org/debian/ unstable main contrib non-free
deb-src http://deb.debian.org/debian/ unstable main contrib non-free
#------------------------------------------------------------------------------#
# UNOFFICIAL REPOS
@jespada
jespada / aws-ec2-launched-in-last.sh
Last active Sep 13, 2018
ec2 instance launched in last X days
View aws-ec2-launched-in-last.sh
#!/bin/bash
# to list instances launched in in the last 15 days run like:
# ./aws-ec2-launched-in-last.sh 15
# https://stackoverflow.com/questions/18858120/finding-all-amazon-aws-instances-that-do-not-have-a-certain-tag
OLDER=$1
if date -v-"$OLDER"d > /dev/null 2>&1; then
@jespada
jespada / percona-xtrabackup.sh
Created Aug 26, 2018 — forked from jaygooby/percona-xtrabackup.sh
Call via crontab on whatever schedule suits you; keep n full mysql Percona xtrabackups of your mysql database, with binary logs applied. Also does a full mysqldump that can then have the binary logs applied to restore to a point-in-time backup via the binlogs. Copy all of this (backup, mysqldump, binlogs) to S3.
View percona-xtrabackup.sh
#!/bin/bash
#
# Carries out a full mysqldump, calls percona-xtrabackup and then
# copies the sql dump, the percona backup and your mysql bin logs
# to S3 using s3cmd http://s3tools.org/s3cmd
#
# TODO: extract out the S3 backup stuff to make it optional, and so
# other s3 programs can replace the s3cmd call.
# TODO: the if [ $? == 0 ] alert blocks should be a function
# TODO: make the if [ $? == 0 ] if [ $? != 0 ] more consistent - test
@jespada
jespada / jenkins_docker_cleanup.gdsl
Created Apr 24, 2018
jenkins dsl cleanup job slaves docker
View jenkins_docker_cleanup.gdsl
// got it from https://gist.github.com/tomnomnom/53998ec618a17d61153911f9b5ade0ed
// The ArrayList of slaves is not serializable, so fetching them should be marked as @NonCPS so that
// no attempt is made to serialize and save the local state of the function. See here for details:
// https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#serializing-local-variables
@NonCPS
def getSlaves() {
def slaves = []
jenkins.model.Jenkins.instance.slaves.each {
if (it.name.startsWith('jenkinsslave-')) {
@jespada
jespada / once-per-jenkins-slave.groovy
Created Apr 24, 2018 — forked from tomnomnom/once-per-jenkins-slave.groovy
Run a command once on each Jenkins slave using the CloudBees Workflow / Jenkins Pipeline plugin
View once-per-jenkins-slave.groovy
// The ArrayList of slaves is not serializable, so fetching them should be marked as @NonCPS so that
// no attempt is made to serialize and save the local state of the function. See here for details:
// https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#serializing-local-variables
@NonCPS
def getSlaves() {
def slaves = []
hudson.model.Hudson.instance.slaves.each {
slaves << it.name
}
return slaves
@jespada
jespada / .editorconfig
Created Feb 16, 2018
editorconfig general
View .editorconfig
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2
; Use tabs for indentation (Makefiles require tabs)
[{Makefile,**.mk}]
View compile-pgloader-ccl.sh
# run as root
git clone git@github.com:dimitri/pgloader.git
cd pgloader
mkdir -p /opt/src/pgloader
cp -R * /opt/src/pgloader
apt-get update
apt-get install -y wget curl make git bzip2 time libzip-dev libssl1.0.0 openssl
apt-get install -y patch unzip libsqlite3-dev gawk freetds-dev subversion
@jespada
jespada / pub-keys
Created Aug 25, 2016
jespada pub keys
View pub-keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHkf7Pnw1swrjJL/m9emEBUzMByLMmLYSCvZn1fZXkc0jwtxV0evHYgbtO3TsZnHr8kMjbWkNHkFHhfnS2yZJ3aWbsIhAuZdqfK8em5JhNfO3xj/wVErC92s6rGiaFNuG3VGOi8iN5hTW3BSJNmUSDSLXVdfmxOvft44T403/cRRtzlYVmBq52rzUvp0KEcPjXLWr3wLOsisnnFOajggfVbeps3gp99DathXvF2PNvr+8NQvfcLfLj6cS7gDcua72Ngig5zXoVX4Wd0yFYNkoR9bpadxfGO53721emxu5x6O1XgiHVWRJcRj+x+zZDx6DQ65Es6LXhNFA77zhxJK5nqX1NPS1BxMxl2ddStOU9W/q9//Hsq/bI8/8ECf2H8CiQU1oS8aL3vxTpOu0ZW5o12Q8xM7G8P62TgnkZccVJ/92POW9LkmXfIYxOg/wmEVtoLGJHAwNe9RCnT1eb1Mh1ge+718H/uB6Xf4l8Blrz8Mv0LKpTN0xN0l9MOGbCt4PNH4fLPuYP2pQyGS48lNOrT2QZ1rraiMyt9+mLaqXbR9x4wk56miH66LLUtgUHENQ1DO/9s8IaES/fXc4KN3dxC8+6yOo0njF4D8aMO4NmkqKenYkuq6DbaeckwUHtH4L33AZHYVS4TCcHTL1pZkXjWitMExLh9y3eD2xXALmpGw== jorge@thor
@jespada
jespada / onename
Created Oct 24, 2015
Verifying that +jespada is my blockchain ID. https://onename.com/jespada
View onename
Verifying that +jespada is my blockchain ID. https://onename.com/jespada
@jespada
jespada / logstash.log
Created Jul 1, 2015
logstatsh hipchat plugin
View logstash.log
:stacktrace=>["org/jruby/ext/openssl/SSLSocket.java:195:in `connect_nonblock'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/ftw-0.0.44/lib/ftw/connection.rb:413:in `do_secure'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/ftw-0.0.44/lib/ftw/connection.rb:393:in `secure'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/ftw-0.0.44/lib/ftw/agent.rb:449:in `connect'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/ftw-0.0.44/lib/ftw/agent.rb:283:in `execute'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-hipchat-1.0.0/lib/logstash/outputs/hipchat.rb:64:in `receive'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/outputs/base.rb:88:in `handle'", "(eval):107:in `output_func'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/pipeline.rb:243:in `outputworker'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.2.2-java/lib/logstash/pipeline.rb:165:in `start_outputs'"], :level=>:warn}
You can’t perform that action at this time.