Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View taoeffect's full-sized avatar

Greg Slepak taoeffect

View GitHub Profile
@andyrbell
andyrbell / scanner.sh
Last active April 5, 2024 09:01
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@yogthos
yogthos / gallery.cljs
Last active March 30, 2024 17:36
script to download walpapers from windowsonearth.org

"Instantly" Understand U.S. Monetary Policy

Well, maybe. If any of this is confusing, see the Resources section at the bottom.

U.S. Economic Policy In A Nutshell

Quick terms (might differ a bit from other sources):

  • "T-bills"/"treasuries"/"bonds" (there are multiple types) = a promise (from the US government) to repay an amount of cash at a specific future date, with interest. These are not intended to be used as money to buy goods/services, but are a mechanism for "the fed" to manipulate interest rates, the amount of cash flowing through the economy, and the amount of cash that the government has to spend on things.
  • "Reserves" = cash (typically cash that a bank actually has).

Clarifying The "Free ETC" Coinbase Confusion

I do not work for Coinbase and do not in any way speak for or represent them. This post was hastily written and is probably full of typos!

This is my attempt to clarify the possibilities that might be going on, based on various Coinbase employee statements.

First, I should highlight that there has been a good amount of confusion created by the replay attacks going on between the "two" Ethereum chains. So much so that it seems to have confused just about everyone, including me, as to the details of what's going on with Coinbase's ETH/ETC (and other ETH/ETC).

I put "two" in quotes because at the moment it's more like there are "1.25 Ethereum chains" because of the replay attacks, which are causing almost every transaction to get mirrored on the other chain. Replay attacks are possible because Ethereum's hard fork did not take steps to make Ethereum transactions invalid on the original chain. Instead, all transactions are valid on both chains unless specia

@khovratovich
khovratovich / BranchSender.sol
Created July 21, 2016 08:34
Split contract by Mikhail Vladimirov
// Simple smart contract that allows anyone to send ether from one address to
// another in certain branch of the blockchain only. This contract is supposed
// to be used after hard forks to clearly separate "classic" ether from "new"
// ether.
contract BranchSender {
// Is set to true if and only if we are currently in the "right" branch of
// the blockchain, i.e. the branch this contract allows sending money in.
bool public isRightBranch;
// Instantiate the contract.

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@m-ou-se
m-ou-se / replace-debian-with-arch.txt
Last active October 22, 2023 12:16
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz'
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1
@markbeee
markbeee / nest.go
Created January 22, 2016 21:44
GoogleNestGo
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
flags "github.com/jessevdk/go-flags"
"io"
"io/ioutil"
@markbeee
markbeee / nest1.json
Created January 22, 2016 21:42
GoogleNestDataFields1
{
"alt_heat_delivery": "forced-air",
"alt_heat_source": "gas",
"alt_heat_x2_delivery": "forced-air",
"alt_heat_x2_source": "gas",
"auto_away_enable": true,
"auto_away_reset": false,
"auto_dehum_enabled": false,
"auto_dehum_state": false,
"aux_heat_delivery": "forced-air",