Skip to content

Instantly share code, notes, and snippets.

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

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
@xunker
xunker / delete_all_from_sender.scpt
Last active January 5, 2025 00:15
Delete all from sender - an Applescript for the Mail.app in Mac OS X that will search for all messages set by the sender of the email message currently open and allow you to delete them all at once.
-- Delete all from sender - https://gist.github.com/xunker/44fa4404c882c27e0ad25857e9470552
-- For the Mail.app in Mac OS X. It will search for all messages set by the sender of the email message currently open,
-- highlight them all and ask if you want to delete them. If you choose "yes" it will delete them for you and then clear
-- the search.
--
-- Important notes:
-- You can load this in Script Editor and then save it as an application so you can run it without Script Editor being open.
-- This does not work when Mail.app is in fullscreen mode; it must be in windowed mode.
-- You will need to enable "Assistive Devices" support for Script Editor (if run there) or for the .app you saved if you converted it to a standalone app.
@rauchg
rauchg / README.md
Last active May 16, 2026 01:17
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 curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256" >> /etc/ssh/sshd_config.new