Skip to content

Instantly share code, notes, and snippets.

View tuffacton's full-sized avatar
👋

Nic Acton tuffacton

👋
View GitHub Profile
@tuffacton
tuffacton / robust_stats.ipynb
Created March 30, 2017 17:11
Iterative-base for robust statistics functions and plotting.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<style>
body {
height: 3000px;
}
.dot {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<style>
body {
/* Uncomment below and set image URL to a background of choice*/
/*background-image: url('https://s-media-cache-ak0.pinimg.com/originals/ef/6f/66/ef6f66567e8e6f077598df1094f1df70.jpg'); */
height: 3000px;

Keybase proof

I hereby claim:

  • I am tuffacton on github.
  • I am nicacton (https://keybase.io/nicacton) on keybase.
  • I have a public key ASAxwHREh5GtcWiVtk2lJBkoIKoXj9FjXVZxfw6Mj5zQjAo

To claim this, I am signing this object:

@tuffacton
tuffacton / copy-pdf.sh
Created November 9, 2017 22:25
Quick shell commands to retrieve and download pdfs from a document containing online links.
# Strip URLs from a file (in this case, a markdown file called Notes.md)
# Append to a working file called link_list.txt
$ grep -o 'https://[^)]*.pdf' Notes.md > link_list.txt
# Download all pdfs from the list you created
$ wget -i ../links_list.txt
# You might have odd filenames, use rename to rename them
# Syntax:
$ rename [options] 's/old/new' files
@tuffacton
tuffacton / classClick.js
Last active January 12, 2018 19:11
Using dev console, click all elements of a given class on a page. Very useful for grocery store rewards pages where you can click on hundreds of coupons.
// Create function
function waitScrape(class_name)
{
console.log("Starting");
var buttons = document.getElementsByClassName(class_name);
for(i = 0; i <= buttons.length; i++) {
setTimeout(function () {
// register click event
buttons[i].click();
// Set wait time for 3 seconds (3000 milliseconds)
@tuffacton
tuffacton / httpd.md
Last active June 12, 2018 17:59
HTTP with Apache

First install apache server:

$ yum install httpd -y

Then start the service

$ service httpd start

If you want to have the service start on reboot

@tuffacton
tuffacton / Docker.md
Last active June 26, 2018 21:57
Docker help scripts

Run a Docker container with a folder attached

$ docker run -it -v <path/to/folder>:</path/in/container> <container_name>

Commiting to new image

$ docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
@tuffacton
tuffacton / tmux.md
Created June 19, 2018 16:57
tmux basics

Start a new session

$ tmux

Detach using ctrl+b then type :detach