| printf "creating database\n" | |
| curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" | |
| printf "creating retention policy\n" | |
| curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY myrp ON mydb DURATION 365d REPLICATION 1 DEFAULT" | |
| printf "inserting data\n" | |
| curl -d '{"database" : "mydb", "retentionPolicy" : "myrp", "points": [{"name":"cpu","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":61}},{"name":"cpu","tags":{"region":"useast","host":"server_2","service":"mysql"},"fields":{"value":53}},{"name":"cpu","tags":{"region":"useast","host":"server_3","service":"apache"},"fields":{"value":80}},{"name":"cpu","tags":{"region":"useast","host":"server_4","service":"nginx"},"fields":{"value":86}},{"name":"cpu","tags":{"region":"useast","host":"server_5","service":"paulapp"},"fields":{"value":87}},{"name":"cpu","tags":{"region":"japan","host":"server_6","service":"redis"},"fields":{"value":10}},{"name":"cpu","tags":{"region":"japan","host":"s |
| class Bar | |
| def calls | |
| ['a','b','c','d'].each do|i| | |
| yield i | |
| end | |
| end | |
| def hello | |
| self.calls do|call| | |
| puts call |
| delete window.document.referrer; | |
| window.document.__defineGetter__('referrer', function () { | |
| return "http://happydays.com"; | |
| }); |
Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)
There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful
| Tool | Link | Comments |
|---|
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
| # This is a general-purpose function to ask Yes/No questions in Bash, either | |
| # with or without a default answer. It keeps repeating the question until it | |
| # gets a valid answer. | |
| ask() { | |
| # http://djm.me/ask | |
| local prompt default REPLY | |
| while true; do |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
| # $ apt install rdiff | |
| # $ rdiff --help | |
| # Usage: rdiff [OPTIONS] signature [BASIS [SIGNATURE]] | |
| # [OPTIONS] delta SIGNATURE [NEWFILE [DELTA]] | |
| # [OPTIONS] patch BASIS [DELTA [NEWFILE]] | |
| # Options: | |
| # -v, --verbose Trace internal processing | |
| # -V, --version Show program version | |
| # -?, --help Show this help message |
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/