Skip to content

Instantly share code, notes, and snippets.

View pauloelias's full-sized avatar

Paulo Elias pauloelias

View GitHub Profile
@objectivehtml
objectivehtml / ajax-current-location.html
Created November 10, 2013 18:10
Channel Search - Search by Current Location
{exp:channel_search:results id="Geolocation" orderby="distance" sort="asc" limit="5"}
{if is_first_row}
{if prev_page || next_page}
<div class="pagination right">
{if prev_page_url}
<a href="{prev_page_url}"><i class="icon-circle-arrow-left"></i> Prev Page</a>
{/if}
@hofmannsven
hofmannsven / README.md
Last active April 1, 2025 06:51
Git CLI Cheatsheet
@mithra62
mithra62 / apc.ini
Created April 30, 2013 17:15
mithra62 APC Configuration
extension=apc.so
[APC]
apc.enabled=1
apc.shm_segments=1
apc.shm_size=1024M
;Relative to the number of cached files (you may need to watch your stats for a day or two to find out a good number)
apc.num_files_hint=7000
@Natetronn
Natetronn / safecracker-garbage-collection.md
Last active April 15, 2019 19:01
Safecracker Garbage Collection

Ever run into this error before?

Uncaught TypeError: Object [object Object] has no method 'markItUp'

If you've ever used Safecracker for ExpressionEngine chances are you have!

What's happening is Safecracker is including JavaScript for custom fields in your form for you. These custom fields rely on said js to function properly. This in itself isn't a big deal but, the issue arises because Safecracker spits out this js right smack in the middle of your template wherever your Safecracker form happens to be located.

Again not the biggest issue except:

@chadcrowell
chadcrowell / gist:5348469
Created April 9, 2013 19:08
Mass delete files from Basecamp Classic. Open files tab in project, paste this into your console and press Enter when prompted to delete each file.
var els = document.querySelectorAll('.left .trash'); for(var i = 0; i < els.length; i++) { els[i].click(); }
@jescalan
jescalan / .profile
Created February 13, 2013 03:46
Create a file called .profile at your user root (~/) and paste this in. Then run the command `source ~/.profile` to reload your terminal.
# path:
PS1='\[\e[0;33m\]⚡\[\e[m\] \[\e[0;31m\]${PWD##*/}\[\e[m\] '
# general shorcuts
alias ll="ls -lahG"
alias reload="source ~/.profile"
alias up="cd .."
alias back="cd -"
alias desktop="cd ~/Desktop"
alias server="python -m SimpleHTTPServer"
@croxton
croxton / stash_nested_embeds.md
Created October 29, 2012 14:23
Stash & template partials - nested embed

Required:

Stash 2.3.4 (beta) or later

Stash template directory

	/layouts/
		standard.html

	/partials/

listing.html

@1stevengrant
1stevengrant / config.php
Created October 28, 2012 17:21
Fixes the daylight savings issue with EE
var $dateTime = new DateTime();
$dateTime->setTimezone(new DateTimeZone('America/New_york'));
$dateTime->setTimestamp(time());
$isDst = (bool)$dateTime->format('I') ? "y" : "n";
$conf['daylight_savings'] = $isDst;
{exp:channel:entries
channel="producers"
disable="member_data|categories|category_fields|pagination"
dynamic="no"
url_title="{segment_3}"
}
{exp:stash:set no_results_prefix="nested_"}
{stash:page_title}{title}{/stash:page_title}
@GDmac
GDmac / pi.test_plugin.php
Created September 27, 2012 23:13
test_plugin for conditionals
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$plugin_info = array(
'pi_name' => 'Test_plugin',
'pi_version' => '1.0',
'pi_author' => 'GDmac',
'pi_author_url' => '',
'pi_description' => 'Testing stuff',
'pi_usage' => Test_plugin::usage()
);