Skip to content

Instantly share code, notes, and snippets.

View matejstrnad's full-sized avatar

Matěj Strnad matejstrnad

  • Czechia
  • 14:28 (UTC +02:00)
View GitHub Profile
@quanhua92
quanhua92 / whitelist_bunny.sh
Created August 10, 2022 06:55
Add Bunny.net Edge Server IP Address to UFW firewall
#!/bin/sh
curl -s https://bunnycdn.com/api/system/edgeserverlist -H "Accept: application/json" | jq -r .[] > /tmp/bunny_ips
echo "" >> /tmp/bunny_ips
curl -s https://bunnycdn.com/api/system/edgeserverlist/ipv6 -H "Accept: application/json" | jq -r .[] >> /tmp/bunny_ips
for ip in `cat /tmp/bunny_ips`; do ufw allow proto tcp from $ip comment 'Bunny IP'; done;
@ZWMiller
ZWMiller / streamAudio.py
Created June 19, 2017 16:36
Using Python to plot the current microphone's input and the Fourier Transform
try:
import pyaudio
import numpy as np
import pylab
import matplotlib.pyplot as plt
from scipy.io import wavfile
import time
import sys
import seaborn as sns
except: