Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Granneman rsgranne

  • WebSanity
  • St. Louis, MO
View GitHub Profile
@selfire1
selfire1 / resize.scpt
Last active Mar 20, 2022
An Applescript to resize windows from the command line
View resize.scpt
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
@rwcitek
rwcitek / chromebook.install.docker.txt
Last active Jul 29, 2022
Install Docker on a Chromebook
View chromebook.install.docker.txt
# 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 \
@jerieljan
jerieljan / btt-screenshot.sh
Created May 22, 2021
Screenshot OCR with BetterTouchTool on MacOS
View btt-screenshot.sh
#!/usr/bin/env bash
# Usage:
# - Install `tesseract` with `brew install tesseract`
# - In BetterTouchTool, create a trigger of your choice.
# (I recommend a Keyboard Shortcut with Cmd+Shift 6)
# - Add an Execute Shell Script / Task action
# - Paste this script.
# NOTE: You'll need to authorize BTT to the Screen Recording permission in Security and Privacy at System Preferences
@nyurik
nyurik / to-logical.py
Last active Jul 18, 2022
Script to convert SCSS files from physical to logical values for RTL and vertical languages
View to-logical.py
#
# 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/
@kevinelliott
kevinelliott / 1-macOS-10.15-catalina-setup.md
Last active Apr 22, 2022
macOS 10.15 Catalina Mostly-Automated Setup
View 1-macOS-10.15-catalina-setup.md

To support my open-source work, consider adding me on Patreon.

macOS 10.15 Catalina Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.15 Catalina.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@sundowndev
sundowndev / GoogleDorking.md
Last active Aug 14, 2022
Google dork cheatsheet
View GoogleDorking.md

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@carnal0wnage
carnal0wnage / DevOOPS: Attacks And Defenses For DevOps Toolchains Talk Links
Last active Jul 13, 2022
Links from Chris Gates/Ken Johnson DevOOPS RSA 17 presentation
View DevOOPS: Attacks And Defenses For DevOps Toolchains Talk Links
@mapmeld
mapmeld / OverEncrypt.md
Last active Sep 27, 2020
OverEncrypt - paranoid HTTPS
View OverEncrypt.md

OverEncrypt

This is a guide that I wrote to improve the default security of my website https://fortran.io , which has a certificate from LetsEncrypt. I'm choosing to improve HTTPS security and transparency without consideration for legacy browser support.

WARNING: if you mess up settings, lose your certificates, or decide to no longer maintain HTTPS certs, these steps can and will make your domain inaccessible.

I would recommend these steps only if you have a specific need for information security, privacy, and trust with your users, and/or maintain a separate secure.example.com domain which won't mess up your main site. If you've been thinking about hosting a site on Tor, then this might be a good option, too.

The best resources that I've found for explaining these steps are https://https.cio.gov , https://certificate-transparency.org , and https://twitter.com/konklone

@JMichaelTX
JMichaelTX / JXA Resources.md
Last active Jul 28, 2022
JavaScript for Automation (JXA) Resources
View JXA Resources.md

JXA Resources

Revised: 2019-11-28 16:16 GMT-6

JXA

This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.

I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.

@tkon99
tkon99 / name.js
Last active Aug 14, 2022
Random Name Generator for Javascript
View name.js
/*
(c) by Thomas Konings
Random Name Generator for Javascript
*/
function capFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function getRandomInt(min, max) {