Skip to content

Instantly share code, notes, and snippets.

@hwcltjn
hwcltjn / sshpass.rb
Created July 31, 2020 18:58
brew install sshpass
require 'formula'
class Sshpass < Formula
url 'https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz'
homepage 'https://sourceforge.net/projects/sshpass'
sha256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
@hwcltjn
hwcltjn / apt_force_ipv4.sh
Created April 6, 2018 14:33
Force Ubuntu apt to use IPv4
#!/bin/bash
echo "Acquire::ForceIPv4 "true";" > /etc/apt/apt.conf.d/99force-ipv4
@hwcltjn
hwcltjn / install_siege.sh
Last active March 28, 2018 18:23
Install Siege on Ubuntu 16.04
#!/bin/bash
apt-get update
apt-get install build-essential libssl-dev -yy
wget http://download.joedog.org/siege/siege-latest.tar.gz
tar -zxvf siege-latest.tar.gz
cd siege-*/
./configure --prefix=/usr/local --with-ssl=/usr/bin/openssl
@hwcltjn
hwcltjn / install_imapsync.sh
Last active June 20, 2018 14:13
Install ImapSync on Ubuntu 16.04
#!/bin/bash
apt update
apt install makepasswd rcs perl-doc libio-tee-perl git libmail-imapclient-perl libdigest-md5-file-perl libterm-readkey-perl libfile-copy-recursive-perl build-essential make automake libunicode-string-perl libauthen-ntlm-perl libcrypt-ssleay-perl libdigest-hmac-perl libfile-copy-recursive-perl libio-compress-perl libio-socket-inet6-perl libio-socket-ssl-perl libio-tee-perl libmodule-scandeps-perl libnet-ssleay-perl libpar-packer-perl libreadonly-perl libterm-readkey-perl libtest-pod-perl libtest-simple-perl libunicode-string-perl liburi-perl cpanminus libssl-dev libdata-uniqid-perl libtest-mockobject-perl -yy
cpanm JSON::WebToken Test::MockObject Unicode::String Data::Uniqid Crypt::OpenSSL::RSA Dist::CheckConflicts JSON::WebToken::Crypt::RSA Sys::MemInfo Regexp::Common
cd