clojure higher-order functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"testing" | |
"time" | |
_ "github.com/lib/pq" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
telegraf: | |
image: telegraf | |
restart: always | |
environment: | |
HOST_PROC: /rootfs/proc | |
HOST_SYS: /rootfs/sys | |
HOST_ETC: /rootfs/etc | |
hostname: localhost | |
volumes: | |
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
tune.ssl.default-dh-param 1024 | |
defaults | |
timeout connect 10000ms | |
timeout client 60000ms | |
timeout server 60000ms | |
frontend fe_http | |
mode http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyaudio | |
import wave | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 | |
RATE = 44100 | |
CHUNK = 1024 | |
RECORD_SECONDS = 5 | |
WAVE_OUTPUT_FILENAME = "file.wav" | |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -C - https://download.java.net/java/ga/jdk11/openjdk-11_osx-x64_bin.tar.gz -O openjdk-11_osx-x64_bin.tar.gz | |
$ tar xf openjdk-11_osx-x64_bin.tar.gz | |
$ sudo mv jdk-11.jdk /Library/Java/JavaVirtualMachines/ | |
$ java -version | |
openjdk version "11" 2018-09-25 | |
OpenJDK Runtime Environment 18.9 (build 11+28) | |
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Assumes an independent box (we'll call this one "graphite") | |
# | |
# Stay up to date | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Install git | |
sudo apt-get install g++ curl libssl-dev -y |
OlderNewer