jqn -r markdown-table 'map(x => "## " + x.name + "\n\n" + markdownTable(x.columns.map(y => [y.name, y.type])) ) | join("\n\n")' < /tmp/stripe.json
id | varchar |
---|---|
business_name | varchar |
business_url | varchar |
curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add - | |
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list | |
apt update | |
apt install -y openvpn |
package main | |
import ( | |
"bufio" | |
"context" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
) |
obj-m += ip_mac_packet_logger.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean | |
install: | |
insmod ip_mac_packet_logger.ko |
Responding to requests via simple route matching is built in to Go's net/http
standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe
to have the default request handler invoked on each request. For example:
package main
import (
package main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"reflect" | |
"time" | |
"github.com/go-sql-driver/mysql" |
// Example function-based high-level Apache Kafka consumer | |
package main | |
/** | |
* Copyright 2016 Confluent Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
#!/Users/username/Documents/python/projectname/env/bin/python | |
# change username and projectname above to match yours - the path must match the path in YOUR virtualenv | |
""" | |
edit line 1 to match what YOU get when you are in YOUR virtualenv and type: | |
which python | |
# NO SPACES in first 3 chars in line 1: #!/ | |
# make sure env is activated! |
package main | |
import ( | |
"encoding/base64" | |
"fmt" | |
rand "math/rand" | |
"time" | |
"github.com/gin-gonic/gin" |
#!/usr/bin/env bash | |
set -e | |
echo "install docker bash completion" | |
curl -L https://raw.githubusercontent.com/docker/docker/v$(docker version --format '{{.Server.Version}}')/contrib/completion/bash/docker -o /etc/bash_completion.d/docker | |
echo "install docker-compose bash completion" | |
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose | |
echo ".... done!" |