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 | |
| inetaddr=`ifconfig igc0 inet | grep inet | cut -d' ' -f2` | |
| inet6addr=`ifconfig igc1 | awk '/inet6 / && $2 !~ /^fe80/ {print $2; exit}'` | |
| CF_API_TOKEN="" | |
| CF_ZONE_ID="" | |
| CF_INET_RECORD_ID="" | |
| CF_INET6_RECORD_ID="" | |
| CF_ENDPOINT="api.cloudflare.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
| Note that this config puts the wireguard interface at routing domain 1, which is nondefault. To run a program using that | |
| routing domain, execute | |
| route -T1 exec your command ... | |
| The reverse, which is installing wireguard to routing domain 0 (default), is also possible. You will need to first move | |
| the "normal" interfaces to routing domain 1, and then use the keyword | |
| wgrtable 1 | |
| when configuring the wireguard interface. This keyword tells wireguard to use routing domain 1 for connecting to the server. | |
| Then, remove the keyword | |
| rdomain 1 |
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 | |
| # PROVIDE: reth | |
| # REQUIRE: FILESYSTEMS netif pflog pfsync routing | |
| . /etc/rc.subr | |
| name="reth" | |
| rcvar=${name}_enable | |
| pidfile="/var/run/${name}.pid" |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <title>Countdown</title> | |
| </head> | |
| <body> | |
| <div style="display: flex; align-items: center; justify-content: center; height: 100vh;"> | |
| <p style="text-align: center; font-family: sans-serif; font-size: 5vh;"> |
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 | |
| # requires pdfjam from MacTeX, install thru tlmgr | |
| for filename in "$@" | |
| do | |
| echo "Laying out $(basename $filename)" | |
| outpath="$(dirname $filename)/$(basename $filename .pdf)_layout.pdf" | |
| pdfjam $filename --nup 1x2 --outfile $outpath &> /dev/null | |
| echo "Output written to $outpath" |
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/python | |
| """ | |
| hl hr | |
| 7.100 8.100 | |
| | | | |
| 7.1 8.1 | |
| r1--9--r2--10-r3--11-r4--12-r5--13-r6 | |
| 1.1 2.1 3.1 4.1 5.1 6.1 | |
| | | | | | | |
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
| /** | |
| * Hello, and welcome to this brief, but hopefully complete, example file for | |
| * wireless packet injection using pcap. | |
| * | |
| * Although there are various resources for this spread on the web, it is hard | |
| * to find a single, cohesive piece that shows how everything fits together. | |
| * This file aims to give such an example, constructing a fully valid UDP packet | |
| * all the way from the 802.11 PHY header (through radiotap) to the data part of | |
| * the packet and then injecting it on a wireless interface | |
| * |
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
| import python_bind | |
| # first exec ./echo-server.sh | |
| def tensorflow_run(dt): | |
| print("processing", dt.decode()) | |
| python_bind.init_cloud() | |
| data = python_bind.recv() |
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
| Useage: ./setinj <device name> <channel> <bandwidth> | |
| Example: ./setinj wlan1 3 HT20 |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.yangl1996.sshtunnelforvnc</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/bin/ssh</string> | |
| <string>-q</string> |
NewerOlder