Skip to content

Instantly share code, notes, and snippets.

View paulfioravanti's full-sized avatar
⌨️
Soon again I heard a tapping somewhat louder than before.

Paul Fioravanti paulfioravanti

⌨️
Soon again I heard a tapping somewhat louder than before.
View GitHub Profile
@jenchanws
jenchanws / enter_raw.py
Last active August 19, 2022 18:40
Raw stroke dictionary (needs `plover-dict-commands` and `plover-stitching` plugins)
LONGEST_KEY = 1
def lookup(steno):
if len(steno) != 1:
raise KeyError
stroke = steno[0]
if stroke == "RA*U":
return "{plover:solo_dict:+raw.py}"
elif stroke == "RA*UZ":
@roine
roine / 0_README.md
Last active April 8, 2021 20:35
Bare minimum for Elm 0.19

From 0.19 Elm introduced 4 ways to boot an app:

  1. sandbox (no outside interaction)
  2. element (simple outside interaction - side effect, flags, subscriptions)
  3. document (same as above but with title tag control)
  4. application (whole SPA features)
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@chbeer
chbeer / gist:3666e4b7b2e71eb47b15eaae63d4192f
Last active September 13, 2023 01:02 — forked from odrobnik/gist:e8ac59e13b62ea80b623
Calling AppleScript from Swift App, passing a parameter. Swift 3 version.
// updated for Swift 3
import Carbon
// Swift version of https://developer.apple.com/library/mac/technotes/tn2084/_index.html
@IBAction func testButtonPushed(sender: AnyObject) {
guard let url = NSBundle.main.url(forResource: "SendFinderMessage", withExtension: "scpt") else {
return
}
@tduarte
tduarte / publish-ghpages.md
Last active May 18, 2024 13:52
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@keithpitty
keithpitty / tmux-ngrok.md
Last active December 15, 2023 16:24
Pairing with tmux and ngrok

Steps for Remote Pairing using tmux and ngrok

The following steps facilitate remote pairing using:

  • tmux which allows terminal sessions to be attached to different terminals, and
  • ngrok which provides secure tunnels to your localhost

1. Install tmux

OS X: brew install tmux

@odrobnik
odrobnik / gist:e8ac59e13b62ea80b623
Created January 11, 2016 11:26
Calling AppleScript from Swift App, passing a parameter
// Swift version of https://developer.apple.com/library/mac/technotes/tn2084/_index.html
@IBAction func testButtonPushed(sender: AnyObject) {
let URL = NSBundle.mainBundle().URLForResource("SendFinderMessage", withExtension: "scpt")!
var errors: NSDictionary?
let script = NSAppleScript(contentsOfURL: URL, error: &errors)!
@smockle
smockle / gif.sh
Last active July 25, 2020 05:34
Convert .mov to .gif in OS X with ffmpeg & imagemagick
ffmpeg -i in.mov -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -layers Optimize -loop 0 - out.gif
@vitorbritto
vitorbritto / regex.md
Last active June 16, 2024 23:15
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@yano3
yano3 / gist:4108957
Created November 19, 2012 04:26
brew upgrade mysql
$ brew upgrade mysql
Warning: Your Xcode (3.2.5) is outdated
Please install Xcode 3.2.6.
==> Upgrading mysql
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mysql-5.5.28.snowleopard.bottle.tar.gz
######################################################################## 100.0%
==> Pouring mysql-5.5.28.snowleopard.bottle.tar.gz
==> Caveats
Set up databases to run AS YOUR USER ACCOUNT with:
unset TMPDIR