Skip to content

Instantly share code, notes, and snippets.

View timstoddard's full-sized avatar

Tim Stoddard timstoddard

View GitHub Profile
javascript:(function(){
window.sendRequest = function(command) {
return function() {
var http = new XMLHttpRequest();
http.open(command, document.commandform.commandurl.value, true);
http.onreadystatechange = function() {
if (http.readyState == 4) {
if (http.status == 200) {
document.commandform.response.value="Bad JSON: "+http.responseText;
# Get the pacakage from the mainline using brazil commands
# Create a new brach from mainline
git checkout -b BRANCH_NAME
# Delete a brach
git branch -D BRANCH_NAME
# Check the status of the current branch
git status
CLOSURE PROPERTIES
REGULAR LANGUAGES
Proof: Regular languages are closed under Union
Let L1 be a RL, with NFA N1 to accept it
Let L2 be a RL, with NFA N2 to accept it
Construct an NFA N3 to accept L1 ∪ L2.
N3 = at initial state, there are epsilon transitions to both N1 and N2.

Keybase proof

I hereby claim:

  • I am timstoddard on github.
  • I am timstoddard (https://keybase.io/timstoddard) on keybase.
  • I have a public key whose fingerprint is 2FE4 E978 F847 530B E358 AD03 39FE 75D4 EBE5 3C62

To claim this, I am signing this object:

// minified
let a=localStorage,b=[];for(const c in a)a.hasOwnProperty(c)&&b.push({key:c,value:JSON.parse(a[c])});console.log(b)
// normal
const items = [];
for (const key in localStorage) {
if (localStorage.hasOwnProperty(key)) {
items.push({
key,
value: JSON.parse(localStorage[key])
// show waitlists in console
javascript:(function(){
let f;
for(let i=0;i<frames.length;i++){if(/calpoly.edu/.test(frames[i].origin)){f=frames[i];break}}
const L=[{a:'E',b:false},{a:'D',b:false},{a:'W',b:true}];
for(let i=0;i<L.length;i++){
const _=L[i],c=f.document.getElementById('DERIVED_REGFRM1_SA_STUDYLIST_'+_.a);
if(c.checked!==_.b)c.click()
}
f.document.getElementById('DERIVED_REGFRM1_SA_STUDYLIST_SHOW$14$').click();
// find the key path of an object with a specific value
const find = (obj, searchTerm, depth = 4, path = '', results = []) => {
if (depth === 0) return results
if (typeof obj === 'object') {
for (let prop in obj) {
try {
find(obj[prop], searchTerm, depth - 1, path ? `${path} -> ${prop}` : `${prop}`, results)
} catch (e) {}
}
} else if (obj && obj.indexOf && obj.indexOf(searchTerm) > -1) {