Skip to content

Instantly share code, notes, and snippets.

View AndrewBarfield's full-sized avatar

Andrew Barfield AndrewBarfield

View GitHub Profile
# Binaural Beats Generator
#
# Streamlit applet to generate binaural beats.
# User can set Duration (seconds), Carrier Frequency (Hz), and Beat Frequency (Hz).
# Generated WAV file can be downloaded from link below graphs.
#
import streamlit as st
import numpy as np
import scipy.io.wavfile
from scipy.signal import windows
@AndrewBarfield
AndrewBarfield / WikiJSPurgeHistory.py
Created December 30, 2021 11:58
Wiki.js: Purge History via GraphQL
import requests
import json
WikiJSGraphQLAccessToken = "replace_with_your_token"
WikiJSGraphQLEndpoint = f"http://192.168.xx.xx:1234/graphql"
# Purge history older than 2 hours
# See: https://en.wikipedia.org/wiki/ISO_8601#Durations
GraphQLPagePurgeHistoryQuery = """mutation Page {
@AndrewBarfield
AndrewBarfield / scan.sh
Created October 25, 2021 17:24
Scan region of RF spectrum using rtl_power_fftw
#!/bin/bash
reset
# FFT bin size for a sample rate of 2,400,000 Hz:
#
# Bin Count Bin Width (Hz) Bin Width (kHz)
# 4 600,000.000 600.000
# 8 300,000.000 300.000
# 16 150,000.000 150.000
@AndrewBarfield
AndrewBarfield / Fibonacci-Sequence-in-a-Web-Worker.markdown
Created January 15, 2015 00:34
Fibonacci Sequence in a Web Worker
@AndrewBarfield
AndrewBarfield / Calculate-Pi-to-5,000-digits-in-a-Web-Worker.markdown
Last active August 29, 2015 14:13
Calculate Pi to 5,000 digits in a Web Worker
@AndrewBarfield
AndrewBarfield / HTML5-Web-Terminal-Script.markdown
Created December 31, 2014 16:52
HTML5 Web Terminal Script

HTML5 Web Terminal Script

A console for the Web written in completely in JavaScript. The console supports Web versions of some Linux commands. This work is based, in part, on earlier work by Eric Bidelman.

A Pen by Andrew Mitchell Barfield on CodePen.

License.

HTML5 Web Terminal

A console for the Web written in completely in JavaScript. The console supports Web versions of some Linux commands. This work is based, in part, on earlier work by Eric Bidelman.

A Pen by Andrew Mitchell Barfield on CodePen.

License.

@AndrewBarfield
AndrewBarfield / Bootstrap-Image-Video-Gallery-.markdown
Created December 29, 2014 20:02
Bootstrap Image/Video Gallery
@AndrewBarfield
AndrewBarfield / Web-Worker-Script-for-"Calculating-Pi-in-a-Web-Worker".markdown
Created December 29, 2014 19:50
Web Worker Script for "Calculating Pi in a Web Worker"