Skip to content

Instantly share code, notes, and snippets.

View ZackMattor's full-sized avatar

Zachary Mattor ZackMattor

View GitHub Profile
@ZackMattor
ZackMattor / _quake3-maps.js
Last active September 7, 2019 18:45
scraping quake3 maps
const puppeteer = require('puppeteer');
const fs = require('fs');
(async () => {
let maps = [];
let count = 0;
let finished = false;
const browser = await puppeteer.launch();
const page = await browser.newPage();
{NOTE_C4, 156, 50},
{NOTE_C5, 156, 50},
{NOTE_A3, 156, 50},
{NOTE_A4, 156, 50},
{NOTE_AS3, 156, 50},
{NOTE_AS4, 156, 50},
{NOTE_REST, 78, 50},
{NOTE_REST, 39, 50},
{NOTE_C4, 156, 50},
{NOTE_C5, 156, 50},
{NOTE_E7, 120, 50},
{NOTE_E7, 120, 50},
{NOTE_REST, 120, 50},
{NOTE_E7, 120, 50},
{NOTE_REST, 120, 50},
{NOTE_C7, 120, 50},
{NOTE_E7, 120, 50},
{NOTE_REST, 120, 50},
{NOTE_G7, 120, 50},
{NOTE_REST, 120, 50},
@ZackMattor
ZackMattor / Usage.md
Created March 29, 2019 16:05
Router testing scripts
./test.sh [SERVER_IP] [HARDWARE_NAME] [RADIO_NAME] [DISTANCE]

If you run ./test.sh archer_c7_v4 5 25 it will generate 3 files. One for the WiFi scan, one for the normal iperf test, and one for the reverse test.

archer_c7_v4_5ghz_25ft_WIFISCAN.txt

archer_c7_v4_5ghz_25ft_IPERF.txt

FROM ruby:2.5.3
RUN apt-get update -qq && apt-get install -y build-essential
RUN apt-get install -y nodejs
RUN gem install bundler
RUN gem install rails
RUN rails new valeness
WORKDIR valeness
RUN bundle
@ZackMattor
ZackMattor / linkedin_convo.js
Created October 17, 2018 15:42
Generates good conversation in LinkedIn chats
// Sends sugested texts in linked in as fast as we can
let i = setInterval(() => {
let $btns = $('.conversations-quick-replies__container button');
if($btns.length == 0) return;
console.log('clicking');
$btns[Math.floor(Math.random() * $btns.length)].click();
}, 100);
// to stop
//#include <ESP8266WiFi.h>
#include <Adafruit_NeoPixel.h>
#define NUMCOLS 20
#define NUMROWS 5
#define NUMCOLORS 6
//const char* ssid = "foobar";
//const char* password = "ApplesAreGoodForYou";
//const char* host = "wifitest.adafruit.com";
@ZackMattor
ZackMattor / docker-compose.yml
Created June 28, 2017 02:55
Postgresql Rails Compose
version: '2'
services:
postgresql:
container_name: pg_local
image: postgres:latest
ports:
- 5432:5432
networks:
- esnet
environment:
@ZackMattor
ZackMattor / script.rb
Created December 19, 2016 22:31
Flatten folder structure
require 'fileutils'
count = 0
Dir::glob('images/**/*.jpg').each do |image|
FileUtils::copy(image, "yay/#{count}.jpg")
end
<div>
<div>
</div>
<div>
</div>
<div>
<div>
<div>