Skip to content

Instantly share code, notes, and snippets.

@gyng
gyng / fdl.js
Created December 24, 2018 03:29
Form definition language sketch
// translate this to json
{
name: cou,
version: 1,
pages: [
{
page: 1,
contents: [somesec, y, z]
}
@gyng
gyng / sortenum.rs
Last active November 16, 2018 09:56
Sorting enums with anonymous structs in Rust
use std::cmp::Ordering;
#[derive(Eq, Debug, PartialOrd, PartialEq)]
enum Foo {
A { val: i64 },
B,
}
// impl PartialEq for Foo {
// fn eq(&self, other: &Self) -> bool {
@gyng
gyng / macgpggit.md
Last active October 26, 2018 07:12
Mac OS guide to signing git commits with GPG

Mac OS guide to signing git commits with GPG

Tested on Mojave (10.14)

  1. Install gnupg and the mac integration
    brew install pinentry-mac
    brew install gpg
    
@gyng
gyng / sync.js
Created October 2, 2018 05:04
GitHub issues in-browser sync script
// Copy and paste this entire file into the browser console and run it to load the script.
// The console can be opened with F12 (Firefox), or Ctrl+Shift+I (Chrome)
//
// Then, to sync the current page (eg, at https://github.com/org/repo/labels)
//
// sync(LABELS);
const LABELS = [
{
name: "todo",
@gyng
gyng / stuff.sh
Created September 15, 2018 06:05
Useful ffmpeg photoprocessing commands
# Combine photos into a vide
ffmpeg -start_number 9030 -i 'DSCF%4d.jpg' -b 8000k -r 60 out.webm
@gyng
gyng / tateChuYoko.css
Created February 3, 2018 22:00
Simulates text-combine-upright: digits 4 (tate-chu-yoko) in Firefox
.num {
text-combine-upright: all;
}
@gyng
gyng / lol.md
Last active May 5, 2023 00:30
Installing Chrome extensions offline

Installing Chrome extensions offline

  1. Download crx

    https://clients2.google.com/service/update2/crx?response=redirect&prodversion=49.0&x=id%3D<🔥replace   me with extension ID🔥>%26installsource%3Dondemand%26uc`
    

    fill in extension ID:

    https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop

@gyng
gyng / stfilter
Last active November 24, 2017 11:37
Straits Times and Today Online uBlock/AdBlock filter/execptions
! Cut the crap
! uBlock
! Get the raw URL and paste into Settings > 3rd-party filters > Custom
! 11/19/2017, 7:02:21 PM http://www.straitstimes.com/politics/mrt-incidents-like-joo-koon-collision-should-not-have-happened-we-must-put-things-right-pm
www.straitstimes.com###hardPaywallModal
||straitstimes.com^$inline-script
! 11/24/2017, 7:14:33 PM http://www.straitstimes.com/singapore/transport/taxpayers-to-pay-part-of-cost-buses-deployed-for-train-network-closures
www.straitstimes.com##.hidden-print.article-sidebar.col-md-4
@gyng
gyng / lmao.rb
Last active January 10, 2017 06:55
lmao: locus manifest appellation omen
# lmao: locus manifest appellation omen
font = 'roman'
to_convert = %w(
lanalyse
lapp
lCI
ldeploy
lscrub
@gyng
gyng / test.html
Created September 7, 2016 06:20
Example SVG filters
<svg>
<defs>
<filter id="displacementFilter">
<feTurbulence type="turbulence" baseFrequency="0.05"
numOctaves="2" result="turbulence"/>
<feDisplacementMap in2="turbulence" in="SourceGraphic"
scale="50" xChannelSelector="R" yChannelSelector="G"/>
</filter>
<filter id="turb">