Skip to content

Instantly share code, notes, and snippets.

View chabala's full-sized avatar
👹
at large

Greg Chabala chabala

👹
at large
View GitHub Profile
@maxandersen
maxandersen / Dockerfile
Last active April 27, 2022 11:06
This is a standalone dockerfile with embedded java and using jbang for building as answer to https://twitter.com/jordisola_/status/1517244462673674240?s=20 Try out using: `docker build -t myapp . && docker run -p 8080:8080 myapp`
# syntax=docker/dockerfile:1.4
FROM jbangdev/jbang-action as builder
WORKDIR /
COPY <<EOF main.java
//DEPS io.quarkus:quarkus-bom:2.8.0.Final@pom
//DEPS io.quarkus:quarkus-resteasy-reactive
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
#!/usr/bin/env python3
BACKUP_FILE = 'backup.ab'
# Constants
# ref: https://github.com/omnirom/android_bootable_recovery/blob/android-7.1/adbbu/twadbstream.h
TWRP = b'TWRP' + b'\x00\x00\x00\x00'
TWSTREAMHDR = b'twstreamheader'
TWFN = b'twfilename'
@anecdata
anecdata / code.py
Last active March 2, 2022 00:06
Test code for WIZnet W5100S-EVB-Pico
import board
import busio
import digitalio
import time
from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K
import adafruit_wiznet5k.adafruit_wiznet5k_socket as socket
import adafruit_requests as requests
SPI0_SCK = board.GP18
SPI0_TX = board.GP19
@Rob--W
Rob--W / manifest.json
Created August 2, 2019 15:20
Dummy extension to prevent elision of "http" / "file" / subdomains from the omnibox in Chrome. Use this instead of the "Suspicious Site Reporter".
// This is a dummy extension that prevents elision of "http" / "file" / subdomains
// from the omnibox by impersonating the "Suspicious Site Reporter" extension.
// Do not use this if you use the "Suspicious Site Reporter" extension.
//
// Usage:
// 1. Create a directory, e.g. "prevent-elision-in-locationbar"
// 2. Put the content of this file as "manifest.json" in that directory.
// 3. Visit chrome://extensions, choose the "Load Unpacked" button and select the directory.
// (OR use the --load-extension=path/to/prevent-elision-in-locationbar flag to load the extension)
// Result:

Colin's Handcrafted, Artisinal Gmail Filters For Github Notifications

Philosophy

I don't want to auto-archive anything, but I want to highlight the important stuff using labels. What's important?

  1. My PRs – "Author" label
  2. My team's PRs (over other teams') – "CPLAN" label (see caveats)
  3. Bumped PRs – "❗️" label
  4. PRs that directly mention me (over mentioning a team I'm on) – "Mentioned" label
@jamsinclair
jamsinclair / shrug.md
Last active July 19, 2022 06:34
Markdown Escaped Shrug

¯\_(ツ)_/¯

@laurenarcher
laurenarcher / livestreamingyoutube
Created November 21, 2014 14:13
Livestreaming to Youtube Live, Ubuntu, Linux FFMPEG
Terminal Commands:
One webcam:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
Two webcam overlay:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -f v4l2 -s 320x240 -r 10 -i /dev/video0 -filter_complex "[1:v]setpts=PTS-STARTPTS[bg]; [2:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=shortest=1 [out]" -map "[out]" -map 0:a -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@dcpesses
dcpesses / photoreflect.js
Last active July 5, 2023 11:41
Re-enable right-click & add Download links to thumbnail pages on PhotoReflect pages.
/*
Copy the single line of code below, then add it as a new bookmark to your web browser of choice:
javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://gist.githubusercontent.com/dcpesses/9652778/raw';})();
Then browse to the thumbnails of the album, click on that bookmark, and...enjoy!
*/
document.oncontextmenu=document.body.oncontextmenu = new Function("return true");