Skip to content

Instantly share code, notes, and snippets.

@kevin-smets
kevin-smets / ..homeSync.md
Last active June 8, 2022 08:22
Feeling homeSync? Sync your home dir to a git repo with launchd every 30 minutes (macOS)

Feeling homeSync?

  1. Place homeSync.sh and homeSync.plist in your home dir
  2. It's recommended to place the .gitignore in your home dir as well, to prevent checking in all your things :)

After doing that, run the following commands in ~/.

cd ~
git init
git remote add origin 
@supermario
supermario / pre-commit
Last active April 21, 2024 20:33
Pre-commit hook to run Rubocop on changed files since fork from master
#!/bin/sh
# Install with:
# curl http://git.io/vEN3k > .git/hooks/pre-commit
# Fail if any command is non-zero
set -e
# Redirect output to stderr.
exec 1>&2
@vszakats
vszakats / s3-upload-aws4.sh
Last active June 13, 2024 16:57
AWS S3 upload using signature v4
#!/bin/sh
# To the extent possible under law, Viktor Szakats
# has waived all copyright and related or neighboring rights to this
# script.
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/
# SPDX-License-Identifier: CC0-1.0
# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@philipptempel
philipptempel / HOWTO.mac-set-file-icon.md
Last active January 5, 2023 17:44
How to set an icon for a file type on Mac?

Q: How to set an icon for some file types throughout the whole system?

For example, I have text files that ends with .scala extension and I want to associate an icon for that files through the whole system and for any newly created file of this extension.

Gisted from http://superuser.com/questions/178316/how-to-set-an-icon-for-a-file-type-on-mac

All credits go to the author of the accepted and top-voted answer by Daniel Beck

A: How to set an icon for a file type on Mac!