I hereby claim:
- I am rhenning on github.
- I am rhenning (https://keybase.io/rhenning) on keybase.
- I have a public key whose fingerprint is 71FE AC16 2CFD 4F14 4779 4541 5326 CF40 1F9E 17BB
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'openssl' | |
require 'socket' | |
require 'timeout' | |
DEFAULT_PORT=443 | |
CONNECT_TIMEOUT=5 | |
targets = ARGV.empty? ? ARGF : ARGV |
filetype plugin on | |
filetype indent on | |
syntax enable | |
colorscheme desert | |
set background=dark | |
set expandtab | |
set smarttab | |
set shiftwidth=2 | |
set tabstop=2 |
// run like: nohup mongo --quiet neat_prod > entity_users.js | |
days_ago = 120 | |
date_after = new Date(new Date().setDate(new Date().getDate() - days_ago)) | |
secs_after = Math.floor(date_after.getTime() / 1000) | |
oid_after = ObjectId(secs_after.toString(16) + "0000000000000000") | |
rs.slaveOk() | |
c = db.entities.find( |
var daysAgo = 10; | |
Date.prototype.toObjectId = function() { | |
var dateSecs = Math.floor(this.getTime() / 1000); | |
return ObjectId(dateSecs.toString(16) + "0000000000000000"); | |
} | |
function daysAgoToDate(daysAgo) { | |
return new Date(new Date().setDate(new Date().getDate() - daysAgo)); | |
} |
#!/usr/bin/env bash | |
awk '/proftp.*successful/ { print $7 }' /var/log/secure{,.?} \ | |
| cut -f1 -d\[ \ | |
| tr -d '(' \ | |
| sort \ | |
| uniq \ | |
| while read ip ; do | |
echo flushing $ip from banlist... | |
for chain in fail2ban-{,REPEAT-}SFTP ; do |
I hereby claim:
To claim this, I am signing this object:
require 'csv' | |
# PASSPACK_CSV_FIELDS = %i[ | |
# title | |
# username | |
# password | |
# url | |
# tags | |
# notes | |
require 'moped' | |
require 'benchmark' | |
s = Moped::Session.new(%w(127.0.0.1:27017)) | |
s.use 'junkdb' | |
s.drop | |
s[:test].insert(foo: []) | |
Benchmark.bm do |b| |
# Hack of robbyrussell's theme, with RVM & Git indicators, but no host indicator | |
# Example: | |
# ✻ currentdir rvm:rubyversion@gemset git:branchname ✗ | |
# Get the current ruby version in use with RVM: | |
if [ -e ~/.rvm/bin/rvm-prompt ]; then | |
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:%{$fg[cyan]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%}%{$reset_color%} " | |
else | |
if which rbenv &> /dev/null; then | |
RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:%{$fg[cyan]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%}%{$reset_color%} " |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCb1Rl3cfJNrppD1JH+ItXN5Hq/IBv6SNTEk1k1Gd8/j4nm05wPtpMDxnwYgt+g8VgVvwRc9v4Ff9I7O+jTU8OOJEGR0wMqb9URhaSbJhQ+hpElg7iWGPudxDGUR9ivyMEII7IlJCFPK2BqxRxdGoZ2IMgSfmntrRo9fTreO7g6maKV1DRgZtO8eSdPc6fPybuVyPMSt3VwPJIkHFXO7dezRrvFheei8MYdscsJxlXBgdGYYbfk2KBR2eCJzmYxLXXnirIriKXtAy4YYNOM/YBxfIwkdcq1RAgo5IdcN32TEoMxbt2+ykYnJBzECJn6A4of1eh27YAklHQzNl0KnwRf rhenning@neat.com |