It's a very simple timetracking tool for linux users that use systemd services & zenity.
(source)
- Put
timetracking.sh
on your computer.
;;; See: https://www.reddit.com/r/emacs/comments/3icpo7/take_a_break_every_3_hours/ | |
(defvar breaktime-timer nil | |
"Holds the running break timer (if any).") | |
(defvar breaktime-interval (* 3 60 60) | |
"How often to take a break, in seconds.") | |
(defun breaktime--take-a-break () | |
(interactive) | |
(switch-to-buffer (get-buffer-create "*breaktime*")) | |
(let ((inhibit-read-only t)) |
function table() { | |
case "$1" in | |
flip) | |
echo "(╯°□°)╯︵ ┻━┻ " | |
;; | |
set) | |
echo "┬─┬ ノ( ゜-゜ノ)" | |
;; | |
man) | |
echo "(╯°Д°)╯︵ /(.□ . \)" |
multiline { | |
tags => ["rails"] | |
pattern => "^Started" | |
negate => true | |
what => "previous" | |
} |
# Here's the script I'll use to demonstrate - it just loops forever: | |
$ cat test.rb | |
#!/usr/bin/env ruby | |
loop do | |
sleep 1 | |
end | |
# Now, I'll start the script in the background, and redirect stdout and stderr |
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import requests | |
POKEURL = 'http://cmmcd.com/PokemonGo/' | |
r = requests.get(POKEURL) | |
try: | |
import lxml |
# On the remote node/server: | |
winrm quickconfig -q | |
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}' | |
winrm set winrm/config '@{MaxTimeoutms="1800000"}' | |
# When NOT USING a domain-based authentication (i.e., from Linux/Unix to Windows node): | |
winrm set winrm/config/service/auth '@{Basic="true"}' |
It's a very simple timetracking tool for linux users that use systemd services & zenity.
(source)
timetracking.sh
on your computer.Operation: Decouple whisper from graphite.
Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.
Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?
The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.
TMATE_FILE=$($(command -v python3 || command -v python) <<EOC | |
import requests | |
r = requests.get( | |
'https://api.github.com/repos/tmate-io/tmate/releases/latest' | |
) | |
releases = r.json() | |
amd64_releases = [ | |
i for i in releases['assets'] | |
if 'amd64' in i['name'] and not 'dbg' in i['name'] | |
][0] |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |