apt-get install git-core build-essential pkg-config libtool libevent-dev libncurses-dev zlib1g-dev automake libssh-dev cmake ruby
git clone https://github.com/msgpack/msgpack-c.git
cd msgpack-c
cmake .
#!/usr/bin/env bash | |
# ~/.ssh/gcp-start-iap-tunnel-ssh-proxy-magic.sh | |
# a script to be used as SSH ProxyCommand to allow fully functional SSH access to any Google Cloud Compute Engine VMs allowing IAP access | |
# | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2022-10-31 | |
# See also: | |
# - https://gist.github.com/netj/df4f9de1fefd254ab11979be7035b5d0/#readme | |
# - https://cloud.google.com/iap/docs/using-tcp-forwarding | |
# |
export REDIS_VERSION="6.0.4" | |
export REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz" | |
apk add --update --no-cache --virtual build-deps gcc make linux-headers musl-dev tar openssl-dev pkgconfig | |
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL" | |
mkdir -p /usr/src/redis | |
tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 | |
cd /usr/src/redis/src | |
make BUILD_TLS=yes MALLOC=libc redis-cli |
#!/bin/bash | |
echo "Restarting bluetooth service..." | |
blueutil -p 0 && sleep 1 && blueutil -p 1 | |
echo "Waiting bluetooth service to be restored..." | |
until blueutil -p | grep "1" >/dev/null; do sleep 1; done | |
echo "Searching for devices not connected..." | |
devices=($(blueutil --paired | grep "not connected" | awk -F '[ ,]' '{print $2}')) |
$ brew install mutt
$ brew install msmtp
Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer
Thanks for stopping by!
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'aws-sdk-core' | |
require 'pp' | |
Aws.config.update({ | |
:access_key_id => ENV["AWS_ACCESS_KEY"], | |
:secret_access_key => ENV["AWS_SECRET_KEY"], | |
:region => 'ap-northeast-1' | |
}) |
fields=0 48 17 18 38 39 40 2 46 47 49 1 | |
sort_key=46 | |
sort_direction=1 | |
hide_threads=0 | |
hide_kernel_threads=1 | |
hide_userland_threads=0 | |
shadow_other_users=0 | |
show_thread_names=0 | |
highlight_base_name=0 | |
highlight_megabytes=1 |
#!/usr/bin/env ruby | |
def upload_and_generate_mobi(source_file, output_file, title) | |
puts "Dealing #{source_file} ..." | |
# get key | |
key = `curl -s http://ebook.cdict.info/mobi/ | grep progress_key`.match(/progress_key=([a-zA-Z0-9]+)/)[1] | |
`curl -s "http://ebook.cdict.info/mobi/revalid.php?progress_key=#{key}"` | |
`curl -s \ |