A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
| #!/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 | |
| # |
| #!/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 |
| # 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) |
| 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 |
| -- 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: |
| ----- 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 |