First, run the following as root to find out which folder is using the most disk inodes:
# for i in `ls -1A`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -5
94520 usr
40694 proc
39851 mnt
39845 srv
34830 home
| #!/usr/bin/env ruby | |
| class Object | |
| # The following are falsy: false, nil, 0, "", and empty arrays/hashes. | |
| # Anything else falls is truthy. This emulates Perl's truthiness. | |
| def truthy? | |
| if self.nil? | |
| return false | |
| elsif self.is_a? Fixnum | |
| return self != 0 |
First, run the following as root to find out which folder is using the most disk inodes:
# for i in `ls -1A`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -5
94520 usr
40694 proc
39851 mnt
39845 srv
34830 home
| package main | |
| import ( | |
| “os” | |
| “github.com/codegangsta/cli” | |
| ) | |
| var app *cli.App |
gogeoip2 - Heroku-based lookup tool for IPs written in Go, which was used to help determine the ASN associated with an IPv4 address (useful for scraping & determining risk)
opensrs - Ruby gem for the OpenSRS domain name API (26k+ downloads)
epp - Ruby gem to help interact with domain registrars which used the EPP system (25k+ downloads)
dockerfiles - Collection of my various Docker images. For an example of the Go single-binary in a scratch image which is only 3MB, see my swarm image:
I hereby claim:
To claim this, I am signing this object:
| package main | |
| import "C" | |
| //export add | |
| func add(a, b int) int { | |
| return a + b | |
| } | |
| func main() {} |
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| FROM alpine:latest | |
| MAINTAINER Joshua Delsman <j@srv.im> | |
| EXPOSE 443 | |
| ENV NGINX_VERSION 1.9.3 | |
| RUN apk add --update openssl-dev pcre-dev zlib-dev build-base \ | |
| && rm -rf /var/cache/apk/* \ |
| #!/bin/bash | |
| instanceID=$1 | |
| date=$(date +%Y%m%d) | |
| function downloadLog () { | |
| local log=$1 | |
| aws rds download-db-log-file-portion \ | |
| --output text \ |
| package main | |
| import ( | |
| "log" | |
| "os" | |
| "strconv" | |
| "github.com/codegangsta/cli" | |
| "github.com/gin-gonic/gin" | |
| "github.com/mediocregopher/radix.v2/redis" |