Skip to content

Instantly share code, notes, and snippets.

@jonlong
jonlong / ripcity.zsh
Created December 16, 2023 04:35
ripcity: a CLI to rip audio/video with yt-dlp
# ripcity
# CLI to rip audio/video with yt-dlp
#
## Usage:
#
# ripcity <VIDEO_ID>
#
# Setup:
# - change <PATH_TO_YOUR_VIDEO_DIR>
# - change <PATH_TO_YOUR_AUDIO_DIR>
@jonlong
jonlong / README.md
Created January 13, 2020 16:44 — forked from pdanford/README.md
OSX <--> Linux VPS Copy and Paste

Description

The below enables OSX style copy and paste between a headless X11 desktop (running on a Linux VPS using fluxbox WM and tightvncserver) and OSX using an OSX VNC client.

It works by remapping X11 keys used by xterm and X11 apps to match OSX command-c and command-v copy and paste. Also enables VNC clients to copy and paste between the OSX and X11 desktops. Note that copy paste works both ways when using the RealVNC OSX client, but with Apple's Screen Sharing you can only paste an X11 copy to the OSX desktop (not vise versa) because it doesn't like autocutsel or Linux or something.

04e79bc27f16bcc5ca17b8c8a36eb4a8c8fc26f66c3e0cd4d81d589df26e8e70b55d0425b81002d28268fef2fa73b1069187f46bd6c2e8071217bb1be9d707f9f0

Keybase proof

I hereby claim:

  • I am jonlong on github.
  • I am jonlong (https://keybase.io/jonlong) on keybase.
  • I have a public key whose fingerprint is 67B7 E3BC 9700 C58C 38A5 8EE4 E24E 0BCE 07F3 F4FA

To claim this, I am signing this object:

import React, {
Alert,
Component,
StyleSheet,
Text,
View,
TextInput,
PropTypes,
addons
} from 'react-native';
@jonlong
jonlong / lw3-ad.md
Last active October 16, 2015 17:20
LW3 ad

Hey all,

Gonna put my Lethal Weapon 3 up for sale and figured I'd put the word out to the group before posting on Craigslist/Pinside. Super fun game, killer theme, great callouts ("diplomatic immunity...is OVER!").

For anyone looking for a first game, I'd highly recommend it. The factory settings are perfectly for getting new players hooked, and you can jack up the incline and pull the outlane posts for something fast and brutal. Same layout as T2.

Solidly in "player's condition" territory, and ready to rock if you just want to fire it up and flip. Also an ideal starting point if you're interested in learning how to maintain and fix up a machine.

Was routed in its previous life, and I bought it from a guy who'd gotten it in a package deal but had an LW3 already. The cabinet's seen better days, but the playfield is in solid shape, and the DMD's error-free. Corey and I scrubbed about a decade's worth of bar grime off of everything, cleaned up the playfield, replaced balls and rubbers, and then played the

@jonlong
jonlong / psa.js
Last active September 2, 2015 16:43
How to Use ES2015 with Node.js, For Regulars
/**
* ES6 looks awesome! Hey, and Node 0.12 supports a ton of features!
*
* ::HOURS LATER::
*
* In strict mode only!
*
* ::HOURS LATER::
*
* The docs say modules are supported! Let's convert everything now!
@jonlong
jonlong / cloudflare-purge-post-receive
Last active May 16, 2022 05:30
Purge CloudFlare when deploying GitHub Pages: post-receive hook
#!/bin/sh
#
# Purge the CloudFlare cache after pushing an update to GitHub Pages
#
# To use, rename this file to "post-receive" and drop it into the `.git/hooks/` directory in your project's root.
# Change the $branch value based on the type of page you're deploying.
# Use "master" for Organization Pages, and "gh-pages" for Project Pages.
#
# Find your CloudFlare API token here: https://www.cloudflare.com/a/account/my-account
@jonlong
jonlong / README.md
Created December 17, 2014 16:45
SVG Sprite approach

Gulp Task

  • Copies individual SVGs to assets folder (in case you need to reference them in CSS)
  • Creates a sprite sheet called icons.svg and gives each sprite an ID based on its filename.
  • Cuts all individual SVGs into fallback PNGs, which are auto-loaded in IE by svg4everybody.

HTML

  • conditionally loads svg4everybody for IE, and uses svg sprite notation to use a spritesheet of SVG images.
@jonlong
jonlong / gulp-cdn-manifest-task.md
Last active August 29, 2015 14:05
Gulp CDN/Manifest task
var gulp = require('gulp');
var revall = require('gulp-rev-all');
var awspublish = require('gulp-awspublish');
var cloudfront = require('gulp-cloudfront');
var jsoneditor = require('gulp-json-editor');
var secrets = require('../../config/secrets');
var config = require('../../config/app');
var handleErrors = require('../util/handleErrors');