Skip to content

Instantly share code, notes, and snippets.

View confluencepoint's full-sized avatar
:octocat:
Focusing

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@antifuchs
antifuchs / private.xml
Created January 27, 2016 21:17
Put this in `Library/Application Support/Karabiner/private.xml`
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>APPLE_INC</vendorname>
<vendorid>0x05ac</vendorid>
</devicevendordef>
<devicevendordef>
<vendorname>FILCO</vendorname>
<vendorid>0x04d9</vendorid>
@zqqf16
zqqf16 / IKEv2.mobileconfig
Last active June 25, 2024 08:14
strongSwan IKEv2 configurations for iOS without certificate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IKEv2</key>
<dict>
<key>AuthName</key>
@ttscoff
ttscoff / TECensor.js
Last active May 4, 2016 13:56
A &#%$ing JavaScript snippet for TextExpander to automatically censor naughtiness with !%@#. #!@& that's cool.
// modify/duplicate the other snippets in this group, using
// the abbreviation to define words to replace with "swear" characters
function censor (input) {
var badWord = input.replace(/((er)?s?|ing)?$/, '');
return input.replace(badWord, censored(badWord));
}
function shuffleArray(inputArr) {
var array = inputArr.slice(0);
@swbuehler
swbuehler / encodeQRTiff.scpt
Created September 15, 2015 17:14
Add QR Code to multipage TIFF files containing the full path to the filename.
tell application "Finder"
set theFiles to the selection
repeat with thisFile in theFiles
try
(* get path and filename information from UNIX *)
set theExtension to the name extension of thisFile
set thePath to the POSIX path of (folder of thisFile as string)
set theFilename to the POSIX path of (thisFile as string)
set theBaseName to (do shell script "/bin/bash -c \"basename " & theFilename & " ." & theExtension & "\"")
set theURLEncodedFilename to (do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of theFilename)
@patrickwelker
patrickwelker / private.xml
Last active September 1, 2015 18:30
My `private.xml` for Karabiner (https://pqrs.org/osx/karabiner/index.html.en).
<?xml version="1.0"?>
<root>
<item>
<name>My Custom Keys</name>
<!-- Caps Lock = Hyper is setup via Seil -->
<item>
<name>F19 to F19</name>
<appendix>F19 to Hyper (ctrl+shift+cmd+opt)</appendix>
<appendix>(+ F19 Only, send escape)</appendix>
<identifier>private.f19-to-f19-and-escape</identifier>
@arnaudlimbourg
arnaudlimbourg / video_to_gif
Created May 21, 2015 10:00
Convert video to animated gif with ffmpeg and gifsicle
# found on the net, here to remember the exact command
brew install gifsicle
ffmpeg -i input_file -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 --colors 256 > outfile.gif
@ttscoff
ttscoff / font_grabber.rb
Last active June 6, 2025 20:51
Give it a <link> from Google fonts and get back CSS with fonts embedded
#!/usr/bin/ruby
# encoding: utf-8
# Grab google web fonts and embed them as base64 data URIs
# <http://brettterpstra.com/2015/03/14/embedding-google-web-fonts/>
require 'base64'
if ARGV.length > 0
input = ARGV
elsif STDIN.stat.size > 0
input = STDIN.read.strip.split(/\n+/)
#!/bin/bash
#
# see https://stribika.github.io/2015/01/04/secure-secure-shell.html
SSHD_VERSION=`/usr/sbin/sshd -v 2>&1 | grep OpenSSH | cut -d " " -f1 | cut -d "_" -f2 | cut -d"." -f2 | cut -d"p" -f1`
cat /etc/ssh/sshd_config | grep -v "KexAlgorithms" | grep -v "Ciphers" | grep -v "MACs" | grep -v "github.com" > /etc/ssh/sshd_config.new
cat /etc/ssh/ssh_config | grep -v "KexAlgorithms" | grep -v "Ciphers" | grep -v "MACs" | grep -v "github.com" > /etc/ssh/ssh_config.new
if [ "${SSHD_VERSION}" != "0" ]; then
# better algorithms only available on newer OpenSSH versions
echo "KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256" >> /etc/ssh/sshd_config.new
@withattribution
withattribution / gist:59c1adc1c0eae4631da0
Created December 17, 2014 19:40
creating gif from mov with ffmpeg and gifsicle
ffmpeg -i in.mov -s 640x360 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=6 > out.gif