npm install forever -g
forever --help
forever start app.js
### your_cronjob.sh #### | |
btc=$(curl -s http://api.coindesk.com/v1/bpi/currentprice.json | python -c "import json, sys; print(int(json.load(sys.stdin)['bpi']['USD']['rate'].replace(',','').split('.')[0] ))") | |
ALERT_BTC=3000 | |
if [ $(($btc + 1)) -gt $ALERT_BTC ]; | |
then | |
echo "btc is greater than $ALERT_BTC"; | |
push "BTC value is greater then $ALERT_BTC" | |
fi; |
listen l1 | |
bind 0.0.0.0:80 | |
mode tcp | |
timeout connect 4000 | |
timeout client 180000 | |
timeout server 180000 | |
server srv1 192.168.1.1:80 | |
global | |
user "nobody" |
/* | |
Target Server Type : MYSQL | |
Target Server Version : 50505 | |
File Encoding : 65001 | |
Date: 2015-03-05 14:23:53 | |
*/ | |
SET FOREIGN_KEY_CHECKS=0; |
<? | |
// | |
// [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
// by @levelsio | |
// | |
// 2017-08-23 | |
// | |
// 1) buy $40/day BTC | |
// 2) buy $10/day ETH | |
// |
This is my response to an email asking about Domain-Driven Design in golang project.
Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.
That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.
Conclusions could be very different, if there was a different project, team or a story-teller.
I have a pet project I work on, every now and then. CNoEvil.
The concept is simple enough.
What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?
Update: I created jq-zsh-plugin that does this.
One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).
Another one of my favourite tools is fzf.