Skip to content

Instantly share code, notes, and snippets.

Time for the annual unnecessary-analysis-of-isaac’s-text-messages:
This year, the relatively-most-common words:
Me Alex Abhi Julia George Deborah Emily Ocko
0 hahah julia's upto kk okey hahaa watcha na
1 till downstairs aite dunno dokey hihi bitch subway
2 tired gotcha sixers alex didnt hbu porch megs
3 headed janki walnut thanks thats lololol dope meg
4 hah julia pm ha dont etc suburbs st
5 naw ken quizzo guys its hooray science breakfast
6 hahahah min otherwise well im stephen comin
@isaac-ped
isaac-ped / capture.lua
Created March 18, 2019 14:27
Moongen script to capture packets at high rate with accurate timestamps
-- Capture packets on a port with high rate and accurate timestamps
local lm = require "libmoon"
local device = require "device"
local log = require "log"
local memory = require "memory"
local stats = require "stats"
local pcap = require "pcap"
function configure(parser)
parser:argument("dev_in", "Device on which to capture from"):args(1):convert(tonumber)
@isaac-ped
isaac-ped / capture.lua
Created March 18, 2019 14:27
Moongen script to capture packets at high rate with accurate timestamps
-- Capture packets on a port with high rate and accurate timestamps
local lm = require "libmoon"
local device = require "device"
local log = require "log"
local memory = require "memory"
local stats = require "stats"
local pcap = require "pcap"
function configure(parser)
parser:argument("dev_in", "Device on which to capture from"):args(1):convert(tonumber)
int rt_id_routing(struct msu_type *type, struct local_msu *sender,
struct msu_msg *msg, struct msu_endpoint *output) {
struct routing_table *table = get_type_from_route_set(&sender->routes, type->id);
if (table == NULL) {
log_error("No routes available from msu %d to type %s (%d)",
sender->id, type->name, type->id);
return -1;
}
// Line MAX_ENDPOINTS could be replaced by a call to get_n_endpoints()
@isaac-ped
isaac-ped / tsget.py
Created October 5, 2018 19:32
Download streams of .ts files
import re
import argparse
import os
import time
import subprocess
from subprocess import Popen
parser = argparse.ArgumentParser(description='get panopto files')
parser.add_argument('curl', type=str)
parser.add_argument('out', type=str)
@isaac-ped
isaac-ped / example_crtp.cpp
Created September 28, 2018 18:03
Example of how I'm using CRTP
#include <vector>
#include <string>
#include <iostream>
class BaseCommand {
public:
virtual void execute() = 0;
};
class BaseExecutor {
import itertools
import logging
import re
import random
import curses
import time
import locale
import codecs
import sys
import urllib2
from BeautifulSoup import BeautifulSoup
import re
#specify the url you want to query
url = "https://en.wikipedia.org/wiki/List_of_Off_the_Air_episodes"
#Query the website and return the html to the variable 'page'
page = urllib2.urlopen(url)
@isaac-ped
isaac-ped / ring
Created June 16, 2018 15:56
Trigger shell to continuously ring the bell after job completion
#!/bin/bash
while [[ 1 ]]; do
for i in `seq 1 10`; do
echo -e '\a\c'
sleep .1
done
sleep 1;
done
## Example:
@isaac-ped
isaac-ped / __init__.py
Last active January 4, 2019 18:30
Python decorators that will memoize the results of a computation-heavy function to a pickle file for later use
from .permanent_memoization import memoize_to_file, memoize_to_folder