Skip to content

Instantly share code, notes, and snippets.

@DRiKE
DRiKE / nginx_access_to_as.rb
Last active Oct 29, 2015
Small script to parse nginx access log file, and find out from what organisation (AS) was visiting your website
View nginx_access_to_as.rb
#!/usr/bin/env ruby
require 'teamcymru'
require 'ipaddr'
c = TeamCymru::ASNClient.new
ips = Array.new
ARGF.each do |line|
ip = IPAddr.new(line.split()[0])
@DRiKE
DRiKE / brightd.service
Created Mar 19, 2013
brightd systemd .service file
View brightd.service
[Unit]
Description=Brightd brightness daemon
Wants=display-manager.service
[Service]
Type=forking
ExecStart=/usr/sbin/brightd -d -x -w 6
Restart=on-abort
[Install]
@DRiKE
DRiKE / rails_admin.nl.yml
Created Feb 25, 2012
Dutch translation for RailsAdmin
View rails_admin.nl.yml
# Localization file for Dutch.
# Translated from the English locale by Luuk Hendriks (DRiKE on github), used the date and datetime
# from https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/nl.yml
# credits for those sections to Ariejan de Vroom and Floris Huetink
nl:
admin:
home:
name: Home
pagination: