This is a simple log watcher written in python 3, works similar to swatch (perl).
DEPRECATION WARNING: maybe you would like more this one https://gist.github.com/iacchus/acbd0ca89c1bd4a1deb7a472dfee931b
#!/usr/bin/env python3
# follow.py
#!/usr/bin/env python3 | |
# 1. Just fill 'app token' and 'user key' below, | |
# 2. make the script executable: chmod +x simple-python-pushover.py | |
# 3. run in command line. | |
# Dependencias are python3 and `requests` lib | |
APP_TOKEN = '' | |
USER_KEY = '' | |
import requests as r |
#!/usr/bin/env python3 | |
import sys, os | |
linelist = list(sys.stdin) | |
# gets the biggest line | |
biggest_line_size = 0 | |
for line in linelist: | |
line_lenght = len(line.expandtabs()) |
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then | |
tmux attach-session -t "$USER" || tmux new-session -s "$USER" | |
fi |
#!env ruby | |
# | |
# brew install sox | |
# | |
def play(note, octave=1) | |
"play -q -n synth sq #{note}#{octave} remix - fade 0 .6 .1 norm; " | |
end | |
song_notes = %w(B A G A B B B A A A G D D B A G A B B B B A A B A G) |
import subprocess | |
import time | |
def wait(seconds): | |
time.sleep(seconds) | |
def play_note(note='C', duration=4, delay=0): | |
# requires sox to be installed |
<script src="https://rawgit.com/paulrosen/abcjs/master/bin/abcjs_plugin_3.1.1-min.js"></script> | |
<script> | |
abcjs_plugin_autostart = false; | |
window.ABCJS.plugin.auto_render = false; | |
ABCJS.plugin.hide_abc = true; | |
ABCJS.plugin.render_options = { | |
scale: 1, | |
staffwidth:700, | |
paddingtop: 0, |
This is a simple log watcher written in python 3, works similar to swatch (perl).
DEPRECATION WARNING: maybe you would like more this one https://gist.github.com/iacchus/acbd0ca89c1bd4a1deb7a472dfee931b
#!/usr/bin/env python3
# follow.py
#!/usr/bin/env python3 | |
# follow.py | |
# | |
# Follow a file like tail -f. | |
import sys | |
import time | |
from iplib import check_ip as CHECKIP |
As seen here: http://blog.z3bra.org/2014/01/images-in-terminal.html
Install packages w3m and some terminal emulator which supports images (urxvt, terminator, termite).