As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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.
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> |
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 |
function table() { | |
case "$1" in | |
flip) | |
echo "(╯°□°)╯︵ ┻━┻ " | |
;; | |
set) | |
echo "┬─┬ ノ( ゜-゜ノ)" | |
;; | |
man) | |
echo "(╯°Д°)╯︵ /(.□ . \)" |
# 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"}' |
;;; 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)) |
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import requests | |
POKEURL = 'http://cmmcd.com/PokemonGo/' | |
r = requests.get(POKEURL) | |
try: | |
import lxml |