Skip to content

Instantly share code, notes, and snippets.

Dependencies for version LATEST
killbill 0.18.20
killbill-oss-parent 0.140.53
killbill-api 0.50.2
killbill-plugin-api 0.23.1
killbill-commons 0.20.17
killbill-platform 0.36.15
Known plugin for KB version LATEST
@zero-master
zero-master / GDPR.md
Last active February 14, 2022 20:07
Show visitors from EU countries a page with GDPR message using Cloudflare and .htaccess
@zero-master
zero-master / largest_files.sh
Created May 24, 2018 09:58
Find largest directories consuming space
#!/bin/bash
du -k /var/logs | sort -n | tail -10
@zero-master
zero-master / truncate_log.sh
Last active May 24, 2018 09:57
Truncate all log files in a directory
#!/bin/bash
# Dry run
find . -type f -name "*.log" -exec echo {} \;
find . -type f -name "*.log" -exec truncate -s 0 {} \;
@zero-master
zero-master / monitor.sh
Created May 24, 2018 09:16
Stackdriver Agent Install
#!/bin/bash
curl -sS https://dl.google.com/cloudagents/install-monitoring-agent.sh | sudo bash
@zero-master
zero-master / block.sh
Last active May 21, 2018 16:44
Block specific IP
# Block
sudo iptables -A INPUT -s 10.240.0.22 -j DROP
# Remove
sudo iptables -D INPUT -s 10.240.0.22 -j DROP
@zero-master
zero-master / remove-stackdriver-logging-agent.sh
Created May 20, 2018 18:26
Remove Stackdriver Logging agent
#!/bash/sh
sudo service google-fluentd stop && sudo apt-get remove google-fluentd google-fluentd-catch-all-config
@zero-master
zero-master / redis-auth.conf
Created May 20, 2018 17:24
Redis (with auth) configuration file for collectd
LoadPlugin redis
<Plugin "redis">
<Node "mynode">
# When using non-standard Redis configurations, replace the below with
#Host "REDIS_HOST"
#Port "REDIS_PORT"
Host "localhost"
Port "6379"
Timeout 2000
Password "SECRET"
@zero-master
zero-master / monitor-redis.sh
Last active May 24, 2018 09:24
Monitor Redis with StackDriver Raw
#!/bash/sh
curl -sS https://dl.google.com/cloudagents/install-monitoring-agent.sh | sudo bash
cd /opt/stackdriver/collectd/etc/collectd.d/
sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/redis.conf
cd -
sudo service stackdriver-agent restart