This file contains hidden or 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
javascript: var el = document.createElement('div'); el.setAttribute('id', 'is-ee-bookmarklet-msg'); el.setAttribute('style', 'padding:15px;margin:0;font-weight:bold;color:#fff;font-size:20px;top:0;left:0;width:100%;text-align:center;position:fixed;z-index:999999999;background-color:#090;'); if (document.cookie.match(/exp_tracker=([^&]*)/)) { el.innerHTML = 'This site uses ExpressionEngine'; } else { el.style.backgroundColor = '#900'; el.innerHTML = 'This site does not use ExpressionEngine'; } if (typeof jQuery != 'undefined') { var el = jQuery(el); el.hide(); jQuery('body').append(el); jQuery('#is-ee-bookmarklet-msg').slideDown(); setTimeout("jQuery('#is-ee-bookmarklet-msg').slideUp();", 4000); } else { document.getElementsByTagName('body')[0].appendChild(el); setTimeout("document.getElementsByTagName('body')[0].removeChild(document.getElementById('is-ee-bookmarklet-msg'));", 4000); } |
This file contains hidden or 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
//JS: var a = b || c || d; | |
//PHP: val($a, $b, $c, $d); | |
function val(&$var) | |
{ | |
$args = func_get_args(); | |
array_shift($args); | |
foreach ($args as $arg) | |
{ |
This file contains hidden or 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 | |
//turn on templates as files in Global Template Preferences | |
//change templates to save as file in Template Preferences Manager | |
require_once PATH_CP.'cp.templates.php'; | |
global $SESS, $LOC, $DB, $DSP; | |
if (is_null($DSP)) | |
{ | |
require_once PATH_CP.'cp.display.php'; |
This file contains hidden or 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
curl -k https://github.com/git/git/raw/master/contrib/completion/git-completion.bash > ~/git-completion.bash; profile=`cat ~/.profile`; echo "source ~/git-completion.bash" > ~/.profile; echo "$profile" >> ~/.profile; |
This file contains hidden or 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 | |
#change this to your path, this is probably it, though | |
eepath="/Applications/MAMP/htdocs/system/expressionengine/third_party" | |
#change this to your ct repository path | |
ctpath="/Users/myname/Documents/cartthrob_2/trunk/system/expressionengine/third_party" | |
eethemepath="$eepath/../../../themes/third_party" |
This file contains hidden or 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 ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Cartthrob_example_extension_ext | |
{ | |
public $settings = array(); | |
public $name = 'CartThrob Example Extension'; | |
public $version = '1.0.0'; | |
public $description = 'CartThrob Example Extension'; | |
public $settings_exist = 'n'; | |
public $docs_url = 'http://cartthrob.com/'; |
This file contains hidden or 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
githubBookmarks.bookmarks = ["/michael/multiselect","/neteye/jquery-plugins","/harvesthq/chosen"]; |
This file contains hidden or 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 | |
$this->EE =& get_instance(); | |
$this->EE->load->add_package_path(PATH_THIRD.'cartthrob/'); | |
$this->EE->load->library('cartthrob_loader'); | |
$params = array( | |
'product_id' => 37, //your entry_id | |
'item_options' => array(), //ie, 'product_size' => 'L', |
This file contains hidden or 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 | |
class My_ext { | |
/* blah blah blah */ | |
public function cp_js_end() | |
{ | |
//be courteous to other users of this hook | |
$str = $this->EE->extensions->last_call; |
This file contains hidden or 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 | |
$url = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on')?'https':'http'.'://'.$_SERVER['HTTP_HOST'].($_SERVER['SERVER_PORT'] != 80)?':'.$_SERVER['SERVER_PORT']:''.$_SERVER['REQUEST_URI']; |
OlderNewer