A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
-- Adapted from these sources: | |
-- http://peterdowns.com/posts/open-iterm-finder-service.html | |
-- https://gist.github.com/cowboy/905546 | |
-- | |
-- Modified to work with files as well, cd-ing to their container folder | |
on run {input, parameters} | |
tell application "Finder" | |
set my_file to first item of input | |
set filetype to (kind of (info for my_file)) | |
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer: |
func colorWithGradient(frame: CGRect, colors: [UIColor]) -> UIColor { | |
// create the background layer that will hold the gradient | |
let backgroundGradientLayer = CAGradientLayer() | |
backgroundGradientLayer.frame = frame | |
// we create an array of CG colors from out UIColor array | |
let cgColors = colors.map({$0.CGColor}) | |
backgroundGradientLayer.colors = cgColors |
# Configuration file for ddclient | |
# | |
# /etc/ddclient.conf | |
# | |
# ddclient configuration for servers behind a UPNP compatible NAT router or modem | |
# | |
# 1. Install ddclient, ssl support and upnpclient : sudo apt-get install ddclient libio-socket-ssl-perl miniupnpc | |
# 2. Copy this configuration file to /etc/ddclient.conf | |
# 3. Adapt the configuration below (especially the <...> fields) |
#!/bin/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `. | |
## Downloads the Mac OS X 10.10 Recovery Partition update, | |
## Copy's over the 10.10 version of Disk Utility.app, then | |
## use git to apply a binary patch so it will run on 10.11+. | |
cd /tmp | |
rm -rf DU1010 | |
mkdir DU1010 |
#!/usr/bin/perl | |
# USAGE: startSSL.pl DOMAIN1 DOMAIN2 ... | |
# | |
# Requires: | |
# - client.crt and client.key in same directory as startSSL.pl | |
# - DOMAIN.csr in the current directory for each domain (in PEM format) | |
# | |
# Outputs: DOMAIN.crt to current directory in PEM format | |
# |
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5309d\) | |
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport |