Skip to content

Instantly share code, notes, and snippets.

@maurelian
maurelian / UtxoToken.sol
Last active December 23, 2022 21:26
UTXO Token
pragma solidity ^0.4.10;
// Based on Alex Miller's design, with minor revisions to appease the compiler, and incorporate Christian Lundkvist's
// input about hash collisions.
contract Bitcoin {
struct UTXO {
address owner;
uint value;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kennwhite
kennwhite / Launch_Alpine_Linux_3.3.x_on_AWS.md
Last active December 15, 2017 14:57
Launch Alpine Linux 3.3.x on Amazon Web Services

Launch_Alpine_Linux_3.3.x_on_AWS.md

Create a local VM of Alpine Linux, eg: https://gist.github.com/kennwhite/959d47a77070d365ad60

  • On your workstation open a terminal and create a new ssh keypair:

    ssh-keygen -t rsa -b 4096 -C "alpine@example.com"

    • Set a meaningful keypair base file name when prompted, eg: alpine-test
@kennwhite
kennwhite / Launch_Alpine_Linux_3.3.x_on_AWS.md
Last active July 18, 2016 17:16
Launch Alpine Linux 3.3.x on Amazon Web Services

Launch_Alpine_Linux_3.3.x_on_AWS.md

Create a local VM of Alpine Linux, eg: https://gist.github.com/kennwhite/959d47a77070d365ad60

  • On your workstation open a terminal and create a new ssh keypair:

    ssh-keygen -t rsa -b 4096 -C "alpine@example.com"

    • Set a meaningful keypair base file name when prompted, eg: alpine-test
@jbenet
jbenet / Makefile
Last active August 29, 2015 14:16
boot-to-ipfs
vmname="IPFS"
iso=/ipfs/QmdTmSQtCz9D6vt2AbvQkYo3edFcTYoU7FDmDD7bPWDccA/ipfs.iso
define notfound
$(iso) not found
make sure the daemon is running and mounted:
ipfs daemon &
ipfs mount
endef
export notfound
@econandrew
econandrew / NominatimOnEC2.md
Last active May 19, 2023 17:51
Instructions for installing an OpenStreetMap Nominatim geocoder instance on Amazon Linux / EC2 (Dec 2014)

Installing Nominatim on Amazon Linux / EC2

  1. Introduction

The official instructions for installing Nominatim are complete, but brief in places, and several steps must be changed in the Amazon Linux environment (which is roughly CentOS / Redhat). The steps below are rough record of what I did to get it working, but I didn't keep perfect track so you shouldn't rely on them as a shell script. Just follow each step, make sure it worked, and hopefully you'll need to adapt very little (version numbers, for one thing). (I also skip in and out of root, but you can be more careful if you like.)

  1. Setting up the EC2 instance

@carlossless
carlossless / jenkins-port-forwarding.md
Last active December 14, 2023 15:49
Port Forwarding (8080 -> 80) with `pf` on Mavericks/Yosemite

Jenkins Port Forwarding (8080 -> 80) with pf on Mavericks/Yosemite

This guide is a fork from this gist. I've added minor adjustments to customise these rules to forward connections from an outsite interface like en0.

Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

1. Create the anchor file

Create an anchor file under /etc/pf.anchors/com.jenkins with your redirection rule like:

#!/bin/sed -rf
# How to run:
# echo 'A A<1+B1-C>B<1-A1+B>D<1-B1qC> 0<0>0'
# Note: Your local sed may use a different flag for "extended" regexes; this is written for GNU sed.
#
# tape: [active-state] " " (state-name "<" (write move next-state)_0 (write move next-state)_1 ">")* " " tape... "<" curpos ">" tape...
# State names can be any character not in " <>".
# The tape consists of 0's and 1's.
# The "move" field can be "-" to move left, "+" to move right, or "q" to halt.
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@vumaasha
vumaasha / install_solr_in_jetty_9.sh
Created September 29, 2013 20:51
Installing solr on jetty 9. Downloads jetty and solr from the given urls and installs the sample core collection1 in solr in jetty 9. Also creates a use for jetty and installs jetty as a service. *Run the script as super user or using sudo in ubuntu.*
#!/bin/sh
# set the configuration variables below, before running the script
# get the solr nightly build download link from https://builds.apache.org/job/Solr-Artifacts-4.x/lastSuccessfulBuild/artifact/solr/package/
JETTY_URL="http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.0.5.v20130815.tar.gz&r=1"
JETTY_HOME="/opt/jetty"
JAVA='/usr/local/jdk1.7.0_09/bin/java'
JETTY_PORT=8085
JETTY_HOST=127.0.0.1