Skip to content

Instantly share code, notes, and snippets.

View davidpelaez's full-sized avatar

David Pelaez davidpelaez

  • Vlipco
  • Bogota, Colombia
View GitHub Profile
require 'rubygems'
require 'bundler/setup'
# include app and config folder in the load paths
$LOAD_PATH << File.join(File.dirname(__FILE__), 'app')
# assume we're in development
ENV['RACK_ENV'] ||= :development
# load all the gems
192.241.176.0/24 dev eth0 proto kernel scope link src 192.241.176.244
10.3.0.0/16 dev eth1 scope link
10.128.0.0/16 dev eth1 proto kernel scope link src 10.128.10.247
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
default via 192.241.176.1 dev eth0
@davidpelaez
davidpelaez / maradns
Last active December 22, 2015 02:49
Original maradns init script
#!/bin/bash
# MaraDNS This shell script takes care of starting and stopping MaraDNS
# chkconfig: - 55 45
# description: MaraDNS is secure Domain Name Server (DNS)
# probe: true
# Copyright 2005-2006 Sam Trenholme
# TERMS
@davidpelaez
davidpelaez / log
Last active December 21, 2015 06:38
The list of power users is this one: %w(ec2-user vagrant)
node[:ssh][:power_users].each do |username|
user_home = %x(echo -n ~#{username})
# backup the base management key
bash "copy_authorized_keys_#{username}" do
code "cd #{user_home}/.ssh && cp authorized_keys authorized_keys.orig"
# skip if there's no such user or the copy has been made
not_if "test -e #{user_home}/.ssh/authorized_keys.orig || ! id #{username}"
end
And you taught me what this feels like. And then how it feels to lose it. And you showed me who I wanted. And then who I wasn’t. And you ticked every box. And then drew a line. And you weren’t mine to begin with. And then not to end with. And you looked like everything I wanted. And then became something I hated. And you get thought of every day. And then not in a good way. And you let me leave. And then wish I’d stayed. And you almost killed me. But I didn't die.
pleasefindthis (2011-12-14). I Wrote This For You (Kindle Locations 55-64). Central Avenue Publishing. Kindle Edition.
receiveMessage = (event)->
# Do we trust the sender of this message? (might be
# different from what we originally opened, for example).
#return if (event.origin !== "http://example.org")
# event.source is popup
# event.data is "hi there yourself! the secret response is: rheeeeet!"
console.log "iframe:", event.data
source 'https://rubygems.org'
ruby '1.9.3'
gem 'httparty'
#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd.
# When the ppp link comes up, this script is called with the following
# parameters:
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the codey device name
# $3 the codey device speed
# $4 the local IP address for the interface
# $5 the remote IP address
"La transformación productiva de Medellín, de ciudad industrial a servicios, redujo la creación de ciencia y tecnología que son, ontológicamente, innovadoras, reemplazándolas por las importaciones." Luego vienen un montón de cifras que no desmuestran de ninguna forma la reducción en la creación, al menos, de tecnología. Estamos hablando de producción en ciertas áreas y eso dificilmente se convierte en evidencia de una reducción, podría incluso ser evidencia de todo lo contrario por el alto costo de la transición y la adaptación de una sociedad completa a otra forma productiva. 10 años son un período en el cual es viable ese pensamiento. No sé si sea así, pero hay que ser abogado del diablo en donde cabe espacio para el rigor.
Por otro lado, sólo ese párrafo da un hint de que la medición de indicadores industriales equivale a demostrar que no hubo creatividad o innovación y excluye totalmente los servicios. Si Bancolombia es antioqueño y tributa al municipio de Medellín, es dueño de la mayoría del sector fina
davidpelaez: https://gist.github.com/davidpelaez/4719163
[7:36pm] LetoTo: thats wrong
[7:36pm] LetoTo: net.ipv4.ip_forward = 1
[7:36pm] LetoTo: net.ipv4.conf.default.rp_filter = 0
[7:37pm] LetoTo: also add
[7:37pm] LetoTo: net.ipv4.conf.all.send_redirects = 0
[7:37pm] LetoTo: net.ipv4.conf.default.send_redirects = 0
[7:37pm] LetoTo: then run sysctl -p
[7:37pm] davidpelaez: ok
[7:37pm] davidpelaez: one sec