Skip to content

Instantly share code, notes, and snippets.

View oakaigh's full-sized avatar
👻
* { color: black !important; }

Jared C oakaigh

👻
* { color: black !important; }
View GitHub Profile
pping() { for a in $@; do drtt=86; rtt=$(ping -qc1 $a 2>&1 | awk -F/ '/^rtt/ { printf "%.2f\n", $5; ok = 1 } END { if (!ok) print "FAIL" }'); (( $(awk 'BEGIN {print ("'$rtt'" <= "'$drtt'")}') )) && echo -e "$a\t$rtt"; done; }
@oakaigh
oakaigh / apstats.md
Last active May 15, 2019 13:00
AP Statistics Checklist

Following is an outline of the major topics covered by the AP Statistics Exam. The ordering here is intended to define the scope of the course but not necessarily the sequence. The percentages in parentheses for each content area indicate the coverage for that content area in the exam.

I. Exploring Data: Describing patterns and departures from patterns (20%–30%)

Exploratory analysis of data makes use of graphical and numerical techniques to study patterns and departures from patterns. Emphasis should be placed on interpreting information from graphical and numerical displays and summaries.

A. Constructing and interpreting graphical displays of distributions of univariate data (dotplot, stemplot, histogram, cumulative frequency plot)

  • 1. Center and spread
  • 2. Clusters and gaps
  • 3. Outliers and other unusual features
  • 4. Shape
@oakaigh
oakaigh / compile.sh
Created April 21, 2019 11:05 — forked from bigtan/compile.sh
shadowsocks-libev static build
apt-get update && apt-get install build-essential automake autoconf libtool git clang -y && export CC=clang
ver=2.6.0
wget --no-check-certificate https://tls.mbed.org/download/mbedtls-$ver-gpl.tgz
tar zxf mbedtls-$ver-gpl.tgz
cd mbedtls-$ver
sed -i "s/DESTDIR=\/usr\/local/DESTDIR=\/projects\/dists\/mbedtls/g" Makefile
LDFLAGS=-static make install
cd ..
#!/bin/sh
INTERFACE=$(networksetup -listnetworkserviceorder | awk -F'\\) ' '/\(1\)/ {print $2}')
ADDRESS=localhost; PORT=1080
if networksetup -getsocksfirewallproxy ${INTERFACE} | grep -q "Yes"; then
networksetup -setsocksfirewallproxystate ${INTERFACE} off
osascript -e 'display notification "eLitet JSOCA disconnected" with title "eLitet Service" sound name "default"' ;;
else
networksetup -setsocksfirewallproxy ${INTERFACE} ${ADDRESS} ${PORT} on
@oakaigh
oakaigh / gethostbyname.sh
Last active March 24, 2019 04:19
POSIX-compatible DNS lookup function
gethostbyname() {
for d in $@; do
address=$(nslookup $d | awk -F: '/Name.*/ { flag = 1; next }
/Address.*/ && flag { print $NF }' | awk '{ print $1 }')
echo ${address:-$d}
done
}
#include <algorithm>
#include <iostream>
#include <cctype>
#include <regex>
int main()
{
std::string str("server\t\n{ a = 5; b ={ a } c = what; } \nisthatthe{ case; }");
//str.erase(remove_if(str.begin(), str.end(), isspace), str.end());
#
# Aghostd Universal
# ElitetNode Server QuarProxy Service
# - Optimized Configuration
#
# (c) Elitet Inc. 2018-2019
# Jared Hillier, Lindsay J. Gibson
#
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
@oakaigh
oakaigh / gateway_netlink.c
Created January 3, 2019 00:42 — forked from javiermon/LICENSE
get default gateway
@oakaigh
oakaigh / Info
Created November 12, 2018 09:55
https://oldwiki.archive.openwrt.org/toh/netgear/wnr2000v4