Add the function somewhere to your dotfiles. Works better if you npm install -g benny-hill
first.
import matplotlib.pyplot as plt | |
from PyQt5 import QtCore | |
import numpy as np | |
import time | |
import math | |
class VisualiseFrequency(QtCore.QThread): | |
def __init__(self, song, canvas, player): |
import cv2 | |
from time import sleep, time | |
import sys | |
import curses | |
from curses import wrapper | |
x = 160 | |
sx = 4 |
import requests | |
import praw | |
import logging | |
import time | |
import random | |
import schedule | |
import pickle | |
import sys | |
from datetime import datetime, timedelta |
There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.
- ffmpeg
- macOS:
brew install ffmpeg
- Ubuntu/Debian:
apt install ffmpeg
- macOS:
clone() { | |
git clone [email protected]:$1/$2.git | |
} |
const randomInterval = (() => { | |
const random = (min, max) => Math.random() * (max - min) + min; | |
return (callback, min, max) => { | |
const time = { | |
start: performance.now(), | |
total: random(min, max) | |
}; | |
const tick = now => { | |
if (time.total <= now - time.start) { | |
time.start = now; |
-
Install Duplicator plugin
-
Build package (optionally filter out large image files)
-
Download archive and installer to an empty directory
-
Create a softlink to the directory ({name}) in the webserver folder
$ sudo ln -s /{name} /var/www/html/{name}
-
Change ownership of the directory to make it writable
This is a ServiceWorker template to turn small github pages into offline ready app.
Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html
file with all the nessesary CSS and JavaScript in it (or maybe 2-3 html/css/js
files). I wanted to cache these files so that I can access my tools offline as well.
Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS
of your repository.
// Comcast Cable Communications, LLC Proprietary. Copyright 2014. | |
// Intended use is to display browser notifications for critical and time sensitive events. | |
var _ComcastAlert = (function(){ | |
return { | |
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do' | |
, dragObj: {zIndex: 999999} | |
, browser: null | |
, comcastCheck: 1 | |
, comcastTimer: null | |
, xmlhttp: null |