% check-soa -i twitter.com
ns1.p34.dynect.net.
208.78.70.34: OK: 2007130853 (22 ms)
2001:500:90:1::34: ERROR: read udp [2001:500:90:1::34]:53: i/o timeout
ns2.p34.dynect.net.
204.13.250.34: ERROR: read udp 204.13.250.34:53: i/o timeout
ns3.p34.dynect.net.
208.78.71.34: OK: 2007130853 (28 ms)
2001:500:94:1::34: ERROR: read udp [2001:500:94:1::34]:53: i/o timeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo docker stop $(docker ps -a -q) | |
sudo docker rm $(docker ps -a -q) | |
sudo docker ps -a | grep 'months ago' | awk '{print $1}' | xargs sudo docker rm | |
sudo docker images | grep "\<none\>" | awk '{ print $3 }' | xargs sudo docker rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -p 2222 -R 2204:192.168.7.176:2204 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -o IdentitiesOnly=yes -i ~/.vagrant.d/insecure_private_key vagrant@127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /etc/puppet/ && puppet agent --test --environment=$1 --verbose --debug 2>&1 | awk -v hostname=$(hostname) '{print hostname" - " strftime("%Y-%m-%d %H:%M:%S") " - " $0}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AWS_PROFILE="default" | |
BUCKETS=$(aws --profile $AWS_PROFILE s3api list-buckets --query 'Buckets[*].Name' --output text) | |
echo -e "bucket name\tstatus of the transition\tprefix the transition applies to\tdays after which the transition applies\tto storage class\tdelete after days\tdescription" | |
for bucket in $BUCKETS; do | |
TRANSITION=$(aws --profile $AWS_PROFILE s3api get-bucket-lifecycle --bucket $bucket --query 'Rules[*][Status, Prefix, Transition.Days, Transition.StorageClass, Expiration.Days ID]' --output text 2> /dev/null) | |
if [ "$?" = "255" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE github_events | |
( | |
event_id bigint, | |
event_type text, | |
event_public boolean, | |
repo_id bigint, | |
payload jsonb, | |
repo jsonb, | |
actor jsonb, | |
org jsonb, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "test_utils" | |
files = Dir['./etc/*_filters_*.conf'] | |
@@configuration = String.new | |
files.sort.each do |file| | |
@@configuration << File.read(file) | |
end | |
describe "my format" do | |
extend LogStash::RSpec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
net.createServer(httpsSshSwitch).listen(443); | |
// if the first byte is 22, it is a https handshake, | |
// so redirect it to the actual https server (running on port 8443) | |
// else redirect it to the ssh instance. | |
// | |
// some ssh clients wait for the server to send the first welcome message | |
// so if we have not seen any data for 2 seconds, assume it is a ssh connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# David Lutz's Multi VM Vagrantfile | |
# inspired from Mark Barger's https://gist.github.com/2404910 | |
boxes = [ | |
{ :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true }, | |
{ :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 }, | |
{ :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1} | |
] |
NewerOlder