Skip to content

Instantly share code, notes, and snippets.

View daniel-abramov's full-sized avatar

Daniel Abramov daniel-abramov

  • Munich, Germany
View GitHub Profile
@garethjenkins
garethjenkins / gist:3027840
Created July 1, 2012 10:26
enumerate displays using CGGetActiveDisplayList
CGDirectDisplayID displays[MAX_DISPLAYS];
uint32_t numDisplays;
uint32_t i;
CGGetActiveDisplayList(MAX_DISPLAYS, displays, &numDisplays);
for(i=0; i<numDisplays; i++)
{
CGDisplayModeRef mode;
CFIndex index, count;
@Darksecond
Darksecond / nginx.conf
Created October 8, 2012 20:24
Systemd + Unicorn + Nginx + no-downtime-reload
# The only setting we feel strongly about is the fail_timeout=0
# directive in the "upstream" block. max_fails=0 also has the same
# effect as fail_timeout=0 for current versions of nginx and may be
# used in its place.
# you generally only need one nginx worker unless you're serving
# large amounts of static files which require blocking disk reads
worker_processes 1;
# # drop privileges, root is needed on most systems for binding to port 80
@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active July 5, 2024 10:43
No, your cryptocurrency cannot work

No, your cryptocurrency cannot work

Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.

They're wrong, and are quite possibly trying to scam you. Let's look at why.

What is a cryptocurrency anyway?

There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.