⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------- | |
// 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); | |
// } |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------- core/components/migx/elements/tv/input/migx.php --------------- | |
index 11a9c2d..53370a5 100644 | |
@@ -133,6 +133,7 @@ $lang = $this->xpdo->lexicon->fetch(); | |
$lang['mig_add'] = !empty($properties['btntext'])?$properties['btntext']:$lang['mig_add']; | |
$modx->smarty->assign('i18n', $lang); | |
$this->xpdo->smarty->assign('properties', $properties); | |
+$this->xpdo->smarty->assign('resource', is_object($this->xpdo->resource) ? $this->xpdo->resource->toArray() : array()); | |
$this->xpdo->smarty->assign('pathconfigs', $this->xpdo->toJSON($pathconfigs)); | |
$this->xpdo->smarty->assign('columns', $this->xpdo->toJSON($cols)); | |
$this->xpdo->smarty->assign('fields', $this->xpdo->toJSON($fields)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($mode == 'new') { | |
$new = $modx->newObject('modDocument'); | |
$new->set('parent',$id); | |
$new->set('pagetitle','My New Pagetitle'); | |
$new->save(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* ========================= | |
* defaultTemplateByParentTv | |
* ========================= | |
* | |
* Plugin for modX Revolution | |
* Set default template for children of a ressource | |
* | |
* Author: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Request and read in db details from user | |
echo "Please enter your database hostname | |
(e.g. localhost) and press [ENTER]:" | |
read db_host | |
echo "Please enter your MODX database name and press [ENTER]:" | |
read db_name | |
echo "Please enter your MODX database user and press [ENTER]:" | |
read db_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
OlderNewer