Skip to content

Instantly share code, notes, and snippets.

View rsgranne's full-sized avatar

Scott Granneman rsgranne

View GitHub Profile
@ryanblock
ryanblock / @ryan tweetbot regex.md
Created August 29, 2012 02:27
How Tweetbot and regex made my Twitter replies usable again (filed under: #wrongryan)

How Tweetbot and regex made my Twitter replies usable again

As it turns out, most normal humans are incapable of learning to use Twitter @ replies. And in case you don't follow me on Twitter: yes, my handle (@ryan) gets a lot of erroneous mentions. (The most amusing, random ones I've even taken to retweeting under the #wrongryan hashtag.)

Then Tweetbot -- and its ability to use regex as Twitter filters -- came along. Here's how the Tapbots guys and some regular expressions single-handedly made my Twitter replies usable again.

Notes and caveats

  • I'm not a regex expert. Far from it. I suck at regex, actually. If you have suggestions for improvements, please leave them below!
  • Some regex may look a little sloppy, but in actuality was written because TweetBot for Mac's regex filter support is very early, and things like repeats (expression{3,}) are buggy. So everything below should work without crashing Tweetbot for iPhone, iPad, and Mac.
  • Obvious, but not everyone should make use of every filter b
@mhulse
mhulse / Amazon S3 snippets and Transmit FTP cloud settings.md
Last active February 21, 2021 18:36
Amazon S3 snippets... Transmit FTP cloud settings... Other related goodies...

S3 Website "Index Document"

index.html:

<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
@selfire1
selfire1 / resize.scpt
Last active March 20, 2022 10:56
An Applescript to resize windows from the command line
on run argv
-- Variables
set _cmd to (item 1 of argv)
tell application "Finder" to set _bounds to bounds of window of desktop
set _xPos to (item 1 of _bounds)
set _yPos to (item 2 of _bounds)
set _ySize to (item 3 of _bounds)
set _xSize to (item 4 of _bounds)
-- get bounds
-- do split: app1, app2, set split
@carnal0wnage
carnal0wnage / DevOOPS: Attacks And Defenses For DevOps Toolchains Talk Links
Last active September 26, 2022 06:00
Links from Chris Gates/Ken Johnson DevOOPS RSA 17 presentation
@nyurik
nyurik / to-logical.py
Last active January 16, 2023 08:29
Script to convert SCSS files from physical to logical values for RTL and vertical languages
#
# This script converts margins, padding, and borders to logical values,
# allowing RTL and vertical languages to show correctly.
# Supports both *.css and *.scss files.
#
# Some renames are not yet implemented widely, and may require CSS plugin
# https://github.com/csstools/postcss-logical
# They have been commented out for now, but feel free to try them out.
#
# Full spec: https://drafts.csswg.org/css-logical/
@dannypage
dannypage / twitter_font_adblock.txt
Created August 24, 2021 21:44
How to block Twitter's terrible font
# Go to uBlock's options and paste in the following under the "My Filters" tab
https://abs.twimg.com/fonts/chirp-bold-web.woff
https://abs.twimg.com/fonts/chirp-heavy-web.woff
https://abs.twimg.com/fonts/chirp-regular-web.woff
https://abs.twimg.com/fonts/v2/chirp-bold-web.woff
https://abs.twimg.com/fonts/v2/chirp-heavy-web.woff
https://abs.twimg.com/fonts/v2/chirp-medium-web.woff
https://abs.twimg.com/fonts/v2/chirp-regular-web.woff
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release
@chockenberry
chockenberry / finder_icons.sh
Created March 16, 2023 20:00
Script to toggle Finder icons
#!/bin/sh
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
enabled=$?
if [ "$1" = "off" ]; then
if [ $enabled -eq 1 ]; then
osascript -e 'tell application "Finder" to quit'
defaults write com.apple.finder CreateDesktop false
open -a Finder
@rwcitek
rwcitek / chromebook.install.docker.sh
Last active April 17, 2023 04:54
Configure Linux and Install Docker on a Chromebook
# https://dvillalobos.github.io/2020/How-to-install-and-run-Docker-on-a-Chromebook/
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update --allow-releaseinfo-change
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
@Julioevm
Julioevm / gist:68275ea1324046caedfdfb2ba0e9b710
Last active July 22, 2023 04:34
Kagi summarize bookmarklet
javascript:(
function() {
let currentUrl = encodeURIComponent(window.location.href);
window.open('https://kagi.com/summarizer/index.html?url=' + currentUrl + '&target_language=&summary=takeaway');
})();