Compile with:
gcc beep.c -o beep
Or on platforms that no longer have gcc by default (e.g. FreeBSD 10):
cc beep.c -o beep
Made for tmux/screen to get your attention in a background window.
| Joe | Smith | 123456 | 147852 | |
|---|---|---|---|---|
| Bill | Jones | 987654 | 369852 | |
| Steve | Miller | 654321 | 852147 |
Compile with:
gcc beep.c -o beep
Or on platforms that no longer have gcc by default (e.g. FreeBSD 10):
cc beep.c -o beep
Made for tmux/screen to get your attention in a background window.
| require 'jekyll-assets' | |
| # optional notification for jekyll build completion | |
| # | |
| # gem install terminal-notifier | |
| # rbenv rehash | |
| # | |
| module Jekyll | |
| class Site |
| export TERM="screen-256color" | |
| if tty -s; then | |
| if [ -z "$WINDOW" ]; then | |
| if tmux has-session -t devops; then | |
| echo -n "tmux found. Re-attach? [Y/n]: " | |
| read response | |
| case $response in | |
| N*|n*) | |
| echo "Okay. Type 'tmux attach' later..." |
| # ======================================================================= | |
| # vim-style copy and paste | |
| setw -g mode-keys vi | |
| bind ] paste-buffer | |
| bind-key -t vi-copy 'v' begin-selection | |
| #bind-key -t vi-copy 'y' copy-selection | |
| bind-key -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy" | |
| # Update default binding of `Enter` to also use copy-pipe | |
| unbind -t vi-copy Enter |
This Jekyll monkey patch triggers a Mac OS X Notification Center notification using the terminal-notifier gem.
If you start jekyll without bundle, first install the necessary gems:
gem install terminal-notifier
gem install terminal-notifier-guard
If you start jekyll with bundle exec (ie. bundle exec jekyll serve --watch, ensure the above two gems are in your Gemfile:
Throw this in your plugins folder and then in your posts or pages, you would just have something like:
Checkout my Twitter feed! {% social_link twitter pgib %}
| IRB.conf[:USE_READLINE] = true | |
| # awesome print | |
| begin | |
| require 'awesome_print' | |
| AwesomePrint.irb! | |
| rescue LoadError => err | |
| warn "Couldn't load awesome_print: #{err}" | |
| end |
| [Definition] | |
| # Option: failregex | |
| # Notes.: regex to match the password failures messages in the logfile. The | |
| # host must be matched by a group named "host". The tag "<HOST>" can | |
| # be used for standard IP/hostname matching and is only an alias for | |
| # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+) | |
| # Values: TEXT | |
| # | |
| failregex = has requested that (<HOST>) be banned$ |
| #!/bin/sh | |
| if [ $# -lt 1 ]; then | |
| echo "Usage: banip <ip>" | |
| exit 1 | |
| fi | |
| for ip in $*; do | |
| echo "Banning ip $ip" | |
| date=`/bin/date +"%Y-%m-%d %H:%M:%S"` |