Skip to content

Instantly share code, notes, and snippets.

View tonetheman's full-sized avatar

Tony Colston tonetheman

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name="viewport" />
<link rel="icon" href="data:,">
<title>String art</title>
<script type="text/javascript" src="jquery.min.js"></script>
<style>
html, body {
import collections
import math
import os
import cv2
import numpy as np
import time
MAX_LINES = 4000
N_PINS = 36*8
MIN_LOOP = 20 # To avoid getting stuck in a loop
@tonetheman
tonetheman / MainApp.java
Created December 10, 2018 12:19 — forked from KrabCode/MainApp.java
Astral, Creative Coding Discord Weekly Challenge: Stars and Astral Bodies
import ch.bildspur.postfx.builder.PostFX;
import processing.core.PApplet;
import processing.core.PGraphics;
import processing.core.PShape;
import processing.core.PVector;
import processing.opengl.PShader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@tonetheman
tonetheman / Test.java
Created July 8, 2017 19:20 — forked from klepikov/Test.java
Demo code for the GTAC 2013 talk "Web Performance Testing with WebDriver" by Michael Klepikov
import java.io.IOException;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import org.json.*;
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.*;
import org.openqa.selenium.logging.*;
@tonetheman
tonetheman / reclaimWindows10.ps1
Created January 7, 2017 18:33 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@tonetheman
tonetheman / MortgageMath.md
Last active August 16, 2016 23:29 — forked from pathikrit/MortgageMath.md
Mortgage Math

Input

p := 100000
apr := 3.0
t := 30

Calcuation:

r := apr/100/12                    # monthly interest rate
@tonetheman
tonetheman / win32.go
Created June 23, 2016 19:53 — forked from nathan-osman/win32.go
Simple Windows GUI application written in Go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
@tonetheman
tonetheman / compact.cpp
Created December 30, 2015 18:58 — forked from Wunkolo/compact.cpp
Ascii Raymarcher
#include <math.h>
#include <algorithm>
#include <string>
#include <pmmintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
@tonetheman
tonetheman / spectrogram.py
Created September 28, 2015 14:32 — forked from maurisvh/spectrogram.py
ANSI art spectrogram viewer that reads audio from a microphone
#!/usr/bin/python
import numpy
import pyaudio
import re
import sys
WIDTH = 79
BOOST = 1.0