Skip to content

Instantly share code, notes, and snippets.

@matthewmccullough
matthewmccullough / .zshrc
Created January 20, 2011 00:00
A configuration to maintain history across sessions and share it across terminals in ZShell
##############################################################################
# History Configuration
##############################################################################
HISTSIZE=5000 #How many lines of history to keep in memory
HISTFILE=~/.zsh_history #Where to save history to disk
SAVEHIST=5000 #Number of history entries to save to disk
#HISTDUP=erase #Erase duplicates in the history file
setopt appendhistory #Append history to the history file (no overwriting)
setopt sharehistory #Share history across terminals
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@spudbean
spudbean / gist:1558257
Last active August 25, 2023 19:26
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@tqc
tqc / rgbatorgb.js
Created May 1, 2012 01:39
Convert RGBA to RGB
function RGBAtoRGB(r, g, b, a, r2,g2,b2){
var r3 = Math.round(((1 - a) * r2) + (a * r))
var g3 = Math.round(((1 - a) * g2) + (a * g))
var b3 = Math.round(((1 - a) * b2) + (a * b))
return "rgb("+r3+","+g3+","+b3+")";
}
$("#result").html(RGBAtoRGB(225,110,0,0.5,255,255,255));
@rvlasveld
rvlasveld / quit-open.applescript
Last active August 12, 2021 17:27
Cocoa-AppleScript to open and close applications when an other launches or terminates. See http://rvlasveld.github.io/blog/2013/04/21/open-and-close-applications-when-an-other-launches-or-terminates/ for more information.
-- main.scpt
-- Cocoa-AppleScript Applet
--
-- This app can close and open applications when an other application,
-- the trigger, is launced or terminated. This can be useful when two
-- applications interfere with eachother or when one is dependend on the
-- other (e.g. with setting an VPN connection).
--
--
-- Roemer Vlasveld (roemer.vlasveld@gmail.com)
@lehnerpat
lehnerpat / gh-compare.md
Last active September 3, 2022 04:33
GitHub Compare view

GitHub's compare view is available at:

https://github.com/$USER/$REPO/compare/$REV_A...$REV_B

Naturally, $USER and $REPO are the owner (user/organization) and repository names, respectively.

$REV{A,B} are the two sides of the compare view; they can either be a ref in $USER's repository, i.e. the name of a branch, tag or a commit SHA, or it can be a ref in $OWNER's fork of the repository by using the format $OWNER:$REF.

You can get a diff or patch for the result of the compare view by appending .diff or .patch to the URL, respectively.

@walesmd
walesmd / IconServiceAgent.md
Last active December 13, 2023 05:06
A lot of people are having issues with com.apple.IconServicesAgent. Since this is a very new issue, Google was no help and `man iconservicesd` is even more hilarious. I eventually fixed it, when I was working on a completely different issue (that is still not fixed). The instructions are below and on the Apple Support Forum, https://discussions.…

I was chasing down another issue (slow "Save As") and thought these two issues may have been related (with QuickLook being the common broken link). Unfortunately, my "Save As" dialog is still miserably slow on the initial load; but IconServicesAgent hasn't gone above 30MB and he rarely makes an appearance in the Console!

Some of these steps may not be necessary, but here are all of the steps I took that inadverdently put IconServicesAgent back in its place. Note: all commands are a single-line, if they appear to be multiple that's just the forum formatting.

  1. Check for any QuickLooks related .plist files. In a terminal: mdfind com.apple.quicklook. -name .plist

  2. I only had files at the system level (specifically within /System/Library/LaunchAgents/). If you have others, modify the directions below to take that into account (re-introducing plist files from the system level back up to the user).

  3. Make some temporary directories to store these plist files, just in case: mkdir ~/tmp-quicklook

@rxaviers
rxaviers / gist:7360908
Last active April 24, 2024 03:33
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ijy
ijy / sublime-text-3-setup.md
Last active January 15, 2024 14:21
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following: