Skip to content

Instantly share code, notes, and snippets.

View JayGoldberg's full-sized avatar

Jay Goldberg JayGoldberg

  • Google
  • San Francisco, CA, USA
View GitHub Profile
@JERiv
JERiv / _GDFOC.md
Last active February 9, 2025 15:24
Google Drive Ownership Cleaner

Google Drive Folder Ownership Cleaner

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<form action="{{ url_for('handle_upload') }}" enctype="multipart/form-data" method="post">
<ul>
<li>
<label for="file">File</label>
for FILE in *.mp4
do
echo $FILE
rm output.jpg
rm output.gif
ffmpeg -ss 30 -i $FILE -vf "select=gt(scene\,0.4)" -frames:v 1 -vsync vfr -vf fps=fps=1/60 out%02d.jpg
convert output.jpg -resize 900x900 ${FILE}.jpg
#rm palette.png
#ffmpeg -ss 20 -y -t 20 -i $FILE -vf fps=1,scale=640:-1:flags=lanczos,palettegen palette.png
#ffmpeg -ss 20 -t 20 -i $FILE -i palette.png -filter_complex "fps=1,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
@rakeshpai
rakeshpai / bitflipper.js
Created July 9, 2016 07:55
Code to randomly turn on or off an LED. With an extremely useful HTTP API. Uses Espruino, running on an ESP8266 (ESP-03).
var wifi = require("Wifi"),
ledPin = D14,
buttonPin = D0,
ssid = "...",
password = "...";
var led = (function() {
var pulseIntervalHandle,
@StevenMaude
StevenMaude / mailin8.sh
Last active August 13, 2024 22:38
DEPRECATED: see https://github.com/StevenMaude/go-mailin8 — Retrieve most recent email from a mailinator.com temporary email box using curl and jq at the command line; useful if you just want some account activation link, but too lazy to visit the site directly. (It's actually mailinfewerthan8usefullines, rather than mailin8usefullines, but, hey…
#!/bin/bash -e
# mailin8.sh: Collect From, Subject, Body from most recent mail
# in a mailinator.com account.
# Usage: mailin8.sh <local_mailbox_name>
# <local_mailbox_name> is the bit before @mailinator.com
# Create temporary file for cookiejar
TEMP=$(mktemp)
@yoshimov
yoshimov / esp8266-espruino-light-sensor.js
Created September 8, 2016 00:48
Light sensor script for Espruino on ESP8266
var http = require("http");
var pre = 0;
var count = 0;
var MAX = 50;
var TIMEOUT = 100;
var POSTURL="http://dweet.io/dweet/for/xxx";
var NOTIFYURL="http://auto-remote-url";
function loop() {
// 0 < val < 1
@gunar
gunar / code.js
Last active August 2, 2024 12:25
Remove Duplicates From GDrive Root
/*
Gunar C. Gessner
@gunar 2016
INSTALL: https://script.google.com/macros/s/AKfycbym7IaTORzJ7LQPcxMx1LV1SQEC6RVGv5tzLOgYS8iQe8XAJxM/exec
After installation, the script will, every 10 minutes, search for all files that have duplicates (shift+z) and remove them from the root directory ("My Drive").
This Google Apps Script webapp aims to solve the problem that when transferring ownership of folders &
files to another account, duplicate files shown in "My Drive".
@lg
lg / angry_wifi.sh
Last active January 20, 2025 03:22
auto disconnects clients with a low signal strength on LEDE / OpenWRT
#!/bin/ash
#
# angry_wifi.sh
#
# auto disconnects clients with a low signal strength on LEDE / OpenWRT. great
# for clients who hold onto a lower-signal-strength accesspoint instead of
# roaming. before running, make sure to download the latest MAC addresses with:
#
# wget --no-check-certificate -O - 'https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MAC&text=apple' | cut -d, -f2 > apple_mac_addresses
#
@MitchRatquest
MitchRatquest / vnc.sh
Last active July 15, 2021 23:04
no nonsense noVNC
#!/bin/bash
#added kill function
#run as:
#./SCRIPTNAME.sh k
#to kill these spawned processes
#
#if you want to to be able to position your windows interactively:
#sudo apt-get -y install blackbox
#add this to the end of runvnc()
#blackbox -display :1 >/dev/null &>/devnull &
@LightAutumnMelancholy
LightAutumnMelancholy / skeleton-daemon.sh
Created February 22, 2017 21:56 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"