⌘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
# | |
# Explanation: | |
# `--adjust-extension` | |
# Add `.html` file extension to any files of type `application/xhtml + xml` or `text/html`. | |
# Add `.css` file extension to any files of type `text/css`. | |
# | |
# `--convert-links` | |
# Convert full links to relative. | |
# | |
# `--level=inf` (`-l inf`) |
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
# Usage: show <local-port> <subdomain> | |
function show() { | |
DOMAIN=".tekacs.com" | |
REMOTE="$2$DOMAIN" | |
ssh -tR 1080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:1080 localhost" | |
} |
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
{exp:low_replace | |
regex="yes" | |
find="(<\/(.*)>)(\s+)$" | |
replace="SPACE<a class='more' href='{title_permalink=bulletin}'>[read more]</a>$1" | |
} | |
{blog_excerpt} | |
{/exp:low_replace} |
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
# Description: | |
# A couple of useful bash one-liners for finding all of the extension hooks in | |
# a given ExpressionEngine installation. Here's what it does: | |
# | |
# 1. Finds all of the native hooks, and any third-party hooks; | |
# 2. Sorts them alphabetically; | |
# 3. Outputs them to STDOUT or a file of your choosing. | |
# | |
# Usage: | |
# CD to the `/system/expressionengine/` directory of your site, and run |
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 | |
/** | |
* Get Upload Preferences (Cross-compatible between ExpressionEngine 2.0 and 2.4) | |
* @param int $group_id Member group ID specified when returning allowed upload directories only for that member group | |
* @param int $id Specific ID of upload destination to return | |
* @return array Result array of DB object, possibly merged with custom file upload settings (if on EE 2.4+) | |
*/ | |
function get_upload_preferences($group_id = NULL, $id = NULL) | |
{ |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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 | |
/* | |
* Instructions: | |
* First add your database connection details below. | |
* Then either upload this script to your server and visit the page, | |
* or run it using the command line: php no_more_msm.php | |
*/ | |
// database connection details |
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/bash | |
# ## git-fresh | |
# | |
# Author: Tristan Blease <tristan@bleaseinteractive.com> | |
# Website: tristanblease.com | |
# License: http://www.opensource.org/licenses/MIT | |
# | |
# Quick shell script to check the freshness of your git repository branches | |
# |
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 | |
/** | |
* Modifying the final CP Output | |
* | |
* This extension demonstrates how you can access and modify the final ExpressionEngine | |
* CP output. It is not a hack, but it is a new technique that to my knowledge has not | |
* been used before in an EE addon. | |
* | |
* This has not been road tested and its side effects are unknown, so use this at your own risk. |
OlderNewer