Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
| #!/bin/bash | |
| # modx-upgrade.sh | |
| # --------------- | |
| # A shell script to help automate the upgrade of a MODX Revolution installation | |
| # This script is for traditional installations only - not advanced | |
| # | |
| # Instructions: | |
| # 1. Update the config section with your own site specific details | |
| # 2. Upload this file to your server, preferably outside of web root |
| <?php | |
| /* | |
| * A small MODX snippet to extract POST, GET, SESSION & COOKIE values - (c) 2012-2016 ackwa.fr | |
| * | |
| * @version : 1.0.4 | |
| * @see : https://gist.github.com/gists/2853625 | |
| * @name : argv.php | |
| * @author : g.noel@ackwa.fr | |
| * @usage : [[!argv?key=`myparam`&default=`1`]] -> return the value | |
| * [[!argv?key=`myparam`&default=`1`&toph=`1`]] -> set [[+argv.myparam]] |
| <?php | |
| /** | |
| * Gets a field from a resource based on a supplied resource id, meant to be used as an output filter. | |
| * | |
| * Based on a resource ID a field can be retrieved. This can be standard fields as 'pagetitle' or 'alias', | |
| * but a few custom fields are also available; 'siblingNextId', 'childrenFirstId', and 'childrenCount'. | |
| * Only resources that are not marked as 'deleted' or 'hidemenu', and that is marked as 'published' are returned. | |
| * Examples: | |
| * [[*id:toResourceField]] => returns the resource pagetitle | |
| * [[*id:toResourceField=`alias`]] => returns the resource alias |
| // -------------------------------------------------------- | |
| // arrows | |
| // -------------------------------------------------------- | |
| // $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right | |
| // $color: hex, rgb or rbga | |
| // $size: px or em | |
| // @example | |
| // .element{ | |
| // @include arrow(top, #000, 50px); | |
| // } |
| alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
The script below is triggered every day from my Mac. I use Hazel to move the tar.gz to an external hard disk once it's finished. This happens every day without me noticing. You can exclude folders if you want to. You probably want to exclude giant cache folders.
You should have a similar script.