Skip to content

Instantly share code, notes, and snippets.


Let's Destroy C

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?

levelsio / btc-eth-dca-buy.php
Last active Sep 2, 2021
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
View btc-eth-dca-buy.php
// by @levelsio
// 2017-08-23
// 1) buy $40/day BTC
// 2) buy $10/day ETH
### ####
btc=$(curl -s | python -c "import json, sys; print(int(json.load(sys.stdin)['bpi']['USD']['rate'].replace(',','').split('.')[0] ))")
if [ $(($btc + 1)) -gt $ALERT_BTC ];
echo "btc is greater than $ALERT_BTC";
push "BTC value is greater then $ALERT_BTC"
mbbx6spp / ALTERNATIVES.adoc
Last active Sep 17, 2021
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
orhanveli / tr-il-ilce-enlem-boylam
Last active Jun 23, 2021
Türkiye il-ilçeleri ve enlem-boylam bilgileri
View tr-il-ilce-enlem-boylam
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2015-03-05 14:23:53
View ddd-in-golang.markdown

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.

Short story

ei-grad / haproxy.cfg
Last active Apr 3, 2018
Trivial haproxy config for tcp port forwarding
View haproxy.cfg
listen l1
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1
user "nobody"
staltz /
Last active Oct 24, 2021
The introduction to Reactive Programming you've been missing
nickleefly /
Last active Dec 13, 2016
forever your node app

Install Forever:

npm install forever -g

now your can run forever

forever --help
forever start app.js