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
| -- MarI/O by SethBling | |
| -- Feel free to use this code, but please do not redistribute it. | |
| -- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM. | |
| if gameinfo.getromname() == "Super Mario World (USA)" then | |
| Filename = "DP1.state" | |
| ButtonNames = { | |
| "A", | |
| "B", | |
| "X", |
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 | |
| # Force outbound traffic through the attached floating IP | |
| # Script must be run as root | |
| NET_INT="eth0" | |
| CURL_TIMEOUT=3 | |
| echo -n "Setting floating IP as the default gateway: " | |
| # Check there's a floating IP attached to this droplet |
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
| ## | |
| ## HTTP Router benchmarks -- Nov 29, 2020 with Go 1.15.5 on Linux AMD 3950x | |
| ## | |
| ## This benchmark suite is based on https://github.com/julienschmidt/go-http-routing-benchmark | |
| ## using the most up-to-date version of each pkg as of today. Each router has their own | |
| ## pros and cons, so consider the designs of each router to suit your application. | |
| ## | |
| ## *NOTE*: the memory reports below by the go benchmark tool look quite wrong, as there must | |
| ## be a bug somewhere in the go bench tool with the Go version I'm running. I will re-run | |
| ## with future versions and report back. However, in general you'll want to look at the "ns/op" |
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 | |
| # Force outbound traffic through the attached floating IP | |
| NET_INT="eth0" | |
| CURL_TIMEOUT=3 | |
| echo -n "Setting floating IP as the default gateway: " | |
| # Check there's a floating IP attached to this droplet | |
| if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
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
| # en1 for WLAN | |
| # en0 for Ethernet | |
| sudo ifconfig en1 down | |
| sudo route flush | |
| sudo ifconfig en1 up |
Go has excellent build tools that mitigate the need for using make.
For example, go install won't update the target unless it's older
than the source files.
However, a Makefile can be convenient for wrapping Go commands with
specific build targets that simplify usage on the command line.
Since most of the targets are "phony", it's up to you to weigh the
pros and cons of having a dependency on make versus using a shell
script. For the simplicity of being able to specify targets that
can be chained and can take advantage of make's chained targets,
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 | |
| # Flushing all rules | |
| iptables -F FORWARD | |
| iptables -F INPUT | |
| iptables -F OUTPUT | |
| iptables -X | |
| # Setting default filter policy | |
| iptables -P INPUT DROP | |
| iptables -P OUTPUT DROP | |
| iptables -P FORWARD DROP |
NewerOlder