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
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
Mostly following the guide found here:
https://wiki.hpdd.intel.com/display/PUB/Create+and+Mount+a+Lustre+Filesystem
- Downgrade kernel if needed:
yum remove kernel-2.6.32-<whatever>*
- Enable EPEL repo:
yum install epel-release
- Enable ZFS on Linux repo:
yum localinstall --nogpgcheck http://archive.zfsonlinux.org/epel/zfs-release.el6.noarch.rpm
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 | |
#################################################################################### | |
# | |
# Download Compile and Install BitchX on Ubuntu | |
# | |
#################################################################################### | |
# download bitchx source | |
# @todo make smarter, i.e. regexp, though now uses _always_ available commands (sic) |
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
# save it as /etc/profile.d/ssh-telegram.sh | |
# use jq to parse JSON from ipinfo.io | |
# get jq from here http://stedolan.github.io/jq/ | |
USERID="<target_user_id>" | |
KEY="<bot_private_key>" | |
TIMEOUT="10" | |
URL="https://api.telegram.org/bot$KEY/sendMessage" | |
DATE_EXEC="$(date "+%d %b %Y %H:%M")" | |
TMPFILE='/tmp/ipinfo-$DATE_EXEC.txt' | |
if [ -n "$SSH_CLIENT" ]; 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
import bottle | |
import requests | |
@bottle.route('/', method='POST') | |
def telegram_bot(): | |
data = bottle.request.json | |
url = 'https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage' | |
try: |
$ uname -r
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
# This is an example from a work in progress, so final versions might | |
# be slightly different. Don't use as a guide after release! | |
# Define rule set macros | |
# Whitelist a TCP destination port on the network. Use this as a template to | |
# make your own rule sets for more advanced criteria like tag matches, etc. | |
# This works for both IPv4 and IPv6. Add an ethertype match to restrict it to | |
# one or the other. | |
macro tcp_whitelist_dest_port($port) |
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
# EdgeRouter Lite 3 configuration example based on the walkthroughs starting | |
# with | |
# http://www.forshee.me/2016/03/01/ubiquiti-edgerouter-lite-setup-part-1-the-basics.html. | |
# | |
# Demonstrates a network setup utilizing VLANs, a zone-based firewall, and | |
# an OpenVPN server. The network has VLANs to segregate home and home-office | |
# network traffic, plus a management VLAN for "smart" networking equipment. | |
# The office VLAN has administrative access to web and SSH interfaces on the | |
# router and the management VLAN whereas the home network does not. | |
# |
OlderNewer