Skip to content

Instantly share code, notes, and snippets.

View shawnhank's full-sized avatar

Shawn Hank shawnhank

View GitHub Profile
@pgib
pgib / bbedit_colours.sh
Created May 6, 2011 19:51
My BBEdit Color Scheme
defaults write com.barebones.bbedit Color:Background -string "rgb(0,0,0)"
defaults write com.barebones.bbedit Color:CTagsIdentifier -string "rgb(57825,39937,11422)"
defaults write com.barebones.bbedit Color:ColorAttributesSeparately -string 1
defaults write com.barebones.bbedit Color:Comment -string "rgb(21845,21845,21845)"
defaults write com.barebones.bbedit Color:Comment:Ruby -string "rgb(34992,34992,34992)"
defaults write com.barebones.bbedit Color:Foreground -string "rgb(65535,65535,65535)"
defaults write com.barebones.bbedit Color:Foreground:CSS -string "rgb(56342,56342,56342)"
defaults write com.barebones.bbedit Color:GuideContrast -string 7
defaults write com.barebones.bbedit Color:HTMLAnchor -string "rgb(43690,0,0)"
defaults write com.barebones.bbedit Color:HTMLAttributeName -string "rgb(57528,45076,5799)"
@kahlil
kahlil / Twilight.bbcolors
Created August 11, 2011 13:02
A Twilightish colorscheme for BBEdit 10+. Drop the file into '~/Library/Application Support/BBEdit/Color Schemes/' to use it.
<?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>BackgroundColor</key>
<string>rgba(0.000000,0.000000,0.000000,1.000000)</string>
<key>CommentsColor</key>
<string>rgba(0.569157,0.569091,0.569188,1.000000)</string>
<key>CtagsIdentifierColor</key>
<string>rgba(0.6,0.0,0.4,1.0)</string>
@hdnl
hdnl / daily_template.md
Last active March 29, 2024 18:44
Template to faciliate taking daily notes in Markdown, featuring start and end day reflections, schedule, and logging

Start-of-Day Reflections

I am grateful for...

What would make today great?

@sebstyle
sebstyle / rancher-on-k3os.md
Last active March 21, 2024 03:43
Install rancher on k3os

Rancher cluster on k3os

Goal

Install rancher on k3os with centralized datastore on mysql cluster.

Environment

  • Host: Ubuntu 18.04.4 Desktop (32gb ram 4 cpu)
  • Virtualisation: kvm/qemu (virtual machine manager)
  • Local network: 192.168.0.0/16
    • Gateway: 192.168.0.1
@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@n8henrie
n8henrie / txt_to_reminders.applescript
Last active March 11, 2024 17:04
Demonstration of using AppleScript with Reminders.app
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder
--set theLines to paragraphs of theFileContents
set theLines to {"task name 1", "task name 2"}
repeat with eachLine in theLines
tell application "Reminders"
set mylist to list "Your List Name"
tell mylist
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"}
@dardo82
dardo82 / safari-favicons.sh
Last active February 16, 2024 02:40
Fix Safari FavIcons
#!/bin/zsh
# Fix Safari Favorites Icons
CS="cache_settings"; TIC="Touch Icons Cache"; DIR="$HOME/Library/Safari/$TIC/Images"
DB="$DIR/../${${TIC// }%%s*}${${(C)CS}//_}.db"; SQL=$(sqlite3 "$DB" "SELECT host FROM $CS")
sqlite3 "$DB" "UPDATE $CS SET ${${${(L)TIC// /_}#*_}//s/_is_in}=1, download_status_flags=1"
for png in "$1"/*.png; do URL="$(plutil -convert xml1 -o - "$DIR/../../Bookmarks.plist" | \
awk -F '[</>]' -v name="${${png##*/}%%.*}" '$3~name{getline;getline;getline;print $5}')"; \
cp -f -v "$png" "$DIR/${(U)$(md5 -q -s $URL)}.png"; done; chflags -v uappnd $DIR $DB*
@fuyuanli
fuyuanli / cloudflare-pve-acme.sh
Last active January 20, 2024 05:43
acme.sh + Proxmox VE
# CloudFlare API
#
# Please install "acme.sh" before runnung this script.
# curl https://get.acme.sh/ | sh
#
export CF_Email="Your_CloudFlare_Account@example.com"
export CF_Key="Your_CloudFlare_API_Key"
/root/.acme.sh/acme.sh --issue \
-d $DOMAIN \
@ilude
ilude / !proxmox_k3s_cluster.sh
Last active January 5, 2024 00:09
Proxmox k3s cluster creation scripts
#!/bin/bash
# curl -s https://gist.githubusercontent.com/ilude/457f2ef2e59d2bff8bb88b976464bb91/raw/cluster_create_setup.sh?$(date +%s) > ~/bin/setup_cluster.sh; chmod +x ~/bin/setup_cluster.sh; setup_cluster.sh
echo "begin cluster_create_setup.sh"
export CREATE_TEMPLATE=1 #false
while test $# -gt 0; do
case "$1" in
--template)
export CREATE_TEMPLATE=0 #true