How to set up multiple accounts with Mutt E-mail Client
Thanks to this article by Christoph Berg
Directories and files
~/
Thanks to this article by Christoph Berg
Directories and files
~/
Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.
Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!
# 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 |
#include <algorithm> | |
#include <chrono> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <iostream> | |
#include <pthread.h> | |
#include <random> | |
const int DATA_LENGTH = 1000000000; |
Since this is on Hacker News and reddit...
_t
in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".char *
s.type * name
, however, is entirely intentional.#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sched.h> | |
#include <errno.h> | |
#define CHILD_STACK_SIZE 1024 * 1024 * 5 // 5 MB | |
#define CHILD_TIME_LIMIT 5 |
Guido van Rossum11 Sep 2012 - Public
Some patterns for fast Python. Know any others?
Avoid overengineering datastructures. Tuples are better than objects (try namedtuple too though). Prefer simple fields over getter/setter functions.
Built-in datatypes are your friends. Use more numbers, strings, tuples, lists, sets, dicts. Also check out the collections library, esp. deque.
Be suspicious of function/method calls; creating a stack frame is expensive.
<VirtualHost *:80> | |
ServerName es.yourhost.com | |
<Proxy balancer://main> | |
BalancerMember http://127.0.0.1:9200 max=1 retry=5 | |
<Limit GET > | |
order deny,allow | |
deny from all | |
allow from 127.0.0.1 |
This playbook has been removed as it is now very outdated. |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |