- Install mutt
$ brew install mutt - Install msmtp
$ brew install msmtp - Generate gmail application password
This file contains hidden or 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
| #!/bin/sh | |
| # Setup dynamic dns on Route 53 for aws ec2 (CNAME) | |
| # | |
| # Modified from Johan Lindh's script | |
| # | |
| # Script requirements: | |
| # | |
| # wget | |
| # grep |
This file contains hidden or 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
| #!/usr/bin/perl | |
| # Author: Todd Larason <jtl@molehill.org> | |
| # $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $ | |
| # use the resources for colors 0-15 - usually more-or-less a | |
| # reproduction of the standard ANSI colors, but possibly more | |
| # pleasing shades | |
| # colors 16-231 are a 6x6x6 color cube | |
| for ($red = 0; $red < 6; $red++) { |
This file contains hidden or 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
| #!/usr/bin/env node | |
| const fs = require("fs"); | |
| const COMPILE_DETAIL_TYPES = new Set([ | |
| "cCompilation", | |
| "compileAssetsCatalog", | |
| "compileStoryboard", | |
| ]); |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| #!/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 | |
| # |
This file contains hidden or 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 ( | |
| "log" | |
| "net/http" | |
| ) | |
| func redirect(w http.ResponseWriter, r *http.Request) { | |
| http.Redirect(w, r, "http://www.google.com", 301) |
This file contains hidden or 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
| def request(context, flow): | |
| if "miiicasa.com" in flow.request.host: | |
| if flow.request.scheme == "https": | |
| flow.request.host = "192.168.254.9" | |
| flow.request.port = "50113" | |
| if flow.request.scheme == "http": | |
| flow.request.host = "192.168.254.9" | |
| flow.request.port = "50110" |
This file contains hidden or 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
| /* | |
| example of c equivalent to php | |
| <?php | |
| // Create the keypair | |
| $res=openssl_pkey_new(); | |
| // Get private key | |
| openssl_pkey_export($res, $privkey); | |
| // Get public key |
This file contains hidden or 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
| #!/bin/sh | |
| # /usr/local/bin/vpn-pppssh | |
| # | |
| # This script initiates a ppp-ssh vpn connection. | |
| # see the VPN PPP-SSH HOWTO on http://www.linuxdoc.org for more information. | |
| # | |
| # revision history: | |
| # 1.6 11-Nov-1996 miquels@cistron.nl | |
| # 1.7 20-Dec-1999 bart@jukie.net | |
| # 2.0 16-May-2001 bronson@trestle.com |
NewerOlder