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/bash | |
while : | |
do | |
WGPROC=$(wg) | |
WGIF=$(ip route show gateway | grep -io oet1) | |
WGSERVER=$(/usr/sbin/nvram get oet1_rem0) | |
WANGWY=$(/usr/sbin/nvram get wan_gateway) | |
WANIF=$(/usr/sbin/nvram get wan_iface) | |
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 ruby | |
host = ARGV[0].to_s | |
if host == "" | |
history_output = `cat ~/.bash_history | grep "^ssh\s" | tail -1` | |
host = history_output.sub(/^ssh\s/i, '').split("@").last.split(" ").first | |
end | |
puts `ssh-keygen -R #{host}` |
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 ruby | |
# Usage: no_automount /Volumes/My\ Disk | |
if ARGV[0].nil? | |
puts "Usage: no_automount /Volumes/My\ Disk" | |
exit 1 | |
end | |
diskinfo = `diskutil info '#{ARGV[0]}'`.gsub("\n\n", "\n").split("\n").collect do |b| |
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
# | |
# This is a simple rackup file for geminabox. It allows simple role-based authorization. | |
# | |
# roles: | |
# - developer | |
# - upload | |
# - delete | |
# - admin (can do anything) | |
# | |
# For example, a developer who can access the service and upload new gems would have the following roles: `%w(developer upload) |
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/ping_check.sh | |
# | |
# First sleep for 3 mins so that we don't run this code if box has only just booted and PPPoE not up yet. | |
/bin/sleep 180 | |
test_http() { | |
url=${1:-http://captive.apple.com} |
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
listen l1 | |
bind 0.0.0.0:443 | |
mode tcp | |
timeout connect 4000 | |
timeout client 180000 | |
timeout server 180000 | |
server srv1 host.example.com:9443 |
I hereby claim:
- I am cmer on github.
- I am cmer (https://keybase.io/cmer) on keybase.
- I have a public key whose fingerprint is D086 FC72 06E0 89F8 7FAE C495 E5F6 43EA 38F0 16D0
To claim this, I am signing this object:
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
# # # # # # # ##### ###### # # #### # # | |
# # ## # # # # # # # ## # # # # # | |
# # # # # # ## ##### ##### # # # # ###### | |
# # # # # # ## # # # # # # # # # | |
# # # ## # # # # # # # ## # # # # | |
#### # # # # # ##### ###### # # #### # # | |
Version 5.1.3 Based on the Byte Magazine Unix Benchmark | |
Multi-CPU version Version 5 revisions by Ian Smith, |
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
# routes.rb | |
put '/payment_details' => 'payment_details#update' | |
# controller | |
class PaymentDetails < Controller | |
def update | |
stripe = Stripe.new | |
stripe.email = params[:stripe][:email] | |
stripe.address = params[:stripe][:address] |