Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am pollosp on github.
  • I am pollosp (https://keybase.io/pollosp) on keybase.
  • I have a public key whose fingerprint is 6B46 263D AE2D 0F8F 3A8C E8CF A1A9 39D5 10DA E8C5

To claim this, I am signing this object:

FROM ruby
run curl https://gist.githubusercontent.com/pollosp/1ebd781f01e95b33e869/raw/6ff280d4b4f3e52e88936c61f24975ed4f1fb845/dockerfile -o /mnt/rackup.sh
run chmod +x /mnt/rackup.sh
ENTRYPOINT /mnt/rackup.sh
root@debianJessie:~# initctl list | grep tty
tty4 start/running, process 789
tty5 start/running, process 792
tty2 start/running, process 803
tty3 start/running, process 807
tty1 stop/waiting
tty6 start/running, process 809
root@debianJessie:~#
root@debianJessie:~# cat /etc/init/tty1.conf
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345] and (
not-container or
container CONTAINER=lxc or
container CONTAINER=lxc-libvirt)
stop on runlevel [!2345]
set $xheader "SAMEORIGIN";
if ($http_referer ~ "XXXX") {
set $xheader "NONE";
}
proxy_hide_header X-Frame-Options;
add_header X-Frame-Options $xheader;
kitchen@1ed8205754be:~$ mysql -u root -pTEST -h 127.0.0.1
ERROR 1045 (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES)
kitchen@1ed8205754be:~$ mysql -u root -pTEST -h 172.17.0.2
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 54
Server version: 5.5.47-0+deb8u1-log (Debian)
Consul and consul-template
https://hub.docker.com/_/ruby/
progrium/consul
gliderlabs/registrator
HOW TO
SET IP
DOCKER_IP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | grep -v 10.)
#!/bin/bash
#Example Invocation
#./dbconv.sh --rds_jdbc=jdbc:mysql://dbtest.cob91vaba6fq.us-east-1.rds.amazonaws.com:3306/sakila
# --rds_tbl=customer --rds_pwd=testpassword --rds_usr=admin
# --red_jdbc=jdbc:postgresql://eudb3.cvprvckckqrm.eu-west-1.redshift.amazonaws.com:5439/dbtest?tcpKeepAlive=true
# --red_usr=admin --red_pwd=test123E —red_tbl=RedTub
# —red_dist=customer_id —red_sort=create_date --red_ins=OVERWRITE_EXISTING
sudo fdisk /dev/xvda << EEOF
d
n
p
1
4096
w
EEOF
sudo partx -u /dev/xvda
time curl http://api.keen.io
{"message": "Specified API Key is invalid. API Key: 'None'.", "error_code": "InvalidApiKeyError"}
real 0m34.150s
user 0m0.008s
sys 0m0.004s