This is an example of Go code calling to a C++ library with a C wrapper.
go build # this only ensures it compiles
# network | |
testnet=0 | |
listen=1 | |
daemon=0 # leave this set to 0 for Docker | |
logtimestamps=1 | |
maxconnections=256 | |
debug=0 | |
printtoconsole=1 | |
# optional indices (required for Insight) |
#!/usr/bin/python | |
import subprocess | |
import os | |
import simplejson | |
import datetime | |
import sys | |
import math | |
import re | |
from time import time |
#! /bin/bash | |
# search based on prefix and most recent date | |
IMAGE_PREFIX="ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-" | |
# Canonical (makers of Ubuntu) | |
OWNER_ID="099720109477" | |
for REGION in $(aws ec2 describe-regions | jq -r '.Regions[].RegionName'); do | |
IMAGE_ID=$(aws ec2 describe-images --region "${REGION}" --filters "Name=name,Values=${IMAGE_PREFIX}*" --owners "$OWNER_ID" | jq -r '.Images | sort_by(.CreationDate)[-1].ImageId') |
package main | |
import "fmt" | |
func main() { | |
// set old (signed 32-bit) version | |
// var versionOld int32 = -987005808 | |
var versionOld int32 = 2 | |
// split into version and type fields (`type` is a reserved keyword in Go) |
$ git log -1 --oneline | |
f255aad (HEAD -> master, origin/master) add separator to break up output | |
$ g++ -std=c++11 range-for-modify.cpp | |
$ ./a.out | |
added = 1 | |
added = 0 | |
key = [2], value = [two] | |
key = [5], value = [five] | |
key = [7], value = [seven] | |
key = [13], value = [thirteen] |
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
commit 02eee15c3341e45f04a5aef424c9df39eff68796 | |
Author: Nathan Marley <nathan.marley@gmail.com> | |
Date: Fri Jun 22 08:01:07 2018 -0700 | |
space to change the checksum | |
diff --git a/src/ninja.key.js b/src/ninja.key.js | |
index b07bac4..25d6ef6 100644 | |
--- a/src/ninja.key.js | |
+++ b/src/ninja.key.js |
# System setup | |
SHELL = bash | |
AWS_ACCOUNT_ID ?= 100000000001 | |
AWS_REGION ?= wa-north-7 | |
AWS_ACCESS_KEY_ID ?= AKIABLAHBLAHBLAHBLAH | |
AWS_SECRET_ACCESS_KEY ?= Z9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+ | |
DOCKER_REGISTRY ?= $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com | |
test: ## Run a basic test suite, currently just the PEP8 style check |