Skip to content

Instantly share code, notes, and snippets.

View ZacharyJacobCollins's full-sized avatar
☁️
head in the clouds

Zachary Collins ZacharyJacobCollins

☁️
head in the clouds
View GitHub Profile
@ZacharyJacobCollins
ZacharyJacobCollins / ping trace.py
Last active May 23, 2017 06:44
python_ping_trace
# create websites.txt, place in same directory as script. Fill with list of splitlines
# create empty file results.txt
# run python ping.py
import urllib2
import subprocess
def readFile():
array = []
with open('./websites.txt') as file:
Update clock synch
sudo ntpdate pool.ntp.org
Install ntp daemon
sudo apt-get install ntp
@ZacharyJacobCollins
ZacharyJacobCollins / grep
Created May 8, 2017 18:19
Grep commands
grep -i "whatever" ./*
searches for thing in current directory
@ZacharyJacobCollins
ZacharyJacobCollins / ngrok yml
Last active April 19, 2021 12:39
Ngrok yml
lives in ~/.ngrok2/ngrok.yml
authtoken: (authtokenhere)
tunnels:
trove-assistant-zcollins:
addr: api-assistant.lift.dev:80
proto: http
host_header: rewrite
bind_tls: true
subdomain: trove-assistant-zcollins
@ZacharyJacobCollins
ZacharyJacobCollins / observable-from-stream.js
Created December 29, 2016 22:07
ES7 Observables + WHATWG Streams
// ES7 Observables + WHATWG Streams
//
// https://github.com/jhusain/asyncgenerator
// https://github.com/whatwg/streams
//
// Continuation from file:
// https://github.com/jhusain/asyncgenerator/blob/master/src/observable.js
Observable.fromStream = function(readable) {
return new Observable(function(generator) {
@ZacharyJacobCollins
ZacharyJacobCollins / Bipartite.java
Created December 1, 2016 19:20
Lab 4 314 tell if a graph is bipartite
import java.util.*;
public class Bipartite
{
private int colors = 2;
private int n;
/**
* Check to ensure that we can move to the desired position within the adjacency matrix
*
@ZacharyJacobCollins
ZacharyJacobCollins / Bipartite.java
Created December 1, 2016 19:20
Lab 4 314 tell if a graph is bipartite
import java.util.*;
public class Bipartite
{
private int colors = 2;
private int n;
/**
* Check to ensure that we can move to the desired position within the adjacency matrix
*
/*
* Zachary Collins
* Discrete 314
* November 29
* Lab 3
*/
import java.util.*;
import java.lang.*;
import java.io.*;
/**
*
* Testing all java operators to experience how they work
* bitwise: designating an operator in a programming language that manipulates the individual bits in a byte or word.
*
*/
public class Driver {
public static void main(String[] args) {
/**
* Zachary Collins
* Lab 2
* 314
*/
import java.util.Scanner;
/** Class Warshall **/
public class Warshall