Skip to content

Instantly share code, notes, and snippets.

Alex Kendrick twosixcode

Block or report user

Report or block twosixcode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@twosixcode
twosixcode / Craft Select Dropdown State field
Last active Mar 4, 2019
Paste this JSON into the settings field in the Craft CMS database "fields" table for your "Dropdown" field
View Craft Select Dropdown State field
{"options":[{"label":"Alabama","value":"AL","default":""},{"label":"Alaska","value":"AK","default":""},{"label":"American Samoa","value":"AS","default":""},{"label":"Arizona","value":"AZ","default":""},{"label":"Arkansas","value":"AR","default":""},{"label":"California","value":"CA","default":""},{"label":"Colorado","value":"CO","default":""},{"label":"Connecticut","value":"CT","default":""},{"label":"Delaware","value":"DE","default":""},{"label":"District Of Columbia","value":"DC","default":""},{"label":"Federated States Of Micronesia","value":"FM","default":""},{"label":"Florida","value":"FL","default":""},{"label":"Georgia","value":"GA","default":""},{"label":"Guam","value":"GU","default":""},{"label":"Hawaii","value":"HI","default":""},{"label":"Idaho","value":"ID","default":""},{"label":"Illinois","value":"IL","default":""},{"label":"Indiana","value":"IN","default":""},{"label":"Iowa","value":"IA","default":""},{"label":"Kansas","value":"KS","default":""},{"label":"Kentucky","value":"KY","default":""},{"
@twosixcode
twosixcode / entry_titles
Created Nov 18, 2012
Linked list of recent entry titles in Blocks
View entry_titles
<h2>Previously... </h2>
<ul>
{% for entry in blx.entries.find({section: 'Blog', limit: '100', order: 'postDate desc'}) %}
<li><a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% endfor %}
</ul>
@twosixcode
twosixcode / entry_titles
Created Nov 18, 2012
Linked list of recent entry titles in Blocks
View entry_titles
<h2>Previously... </h2>
<ul>
{% for entry in blx.entries.find({section: 'Blog', limit: '100', order: 'postDate desc'}) %}
<li><a href="{{ entry.url }}">{{ entry.title }}</a></li>
{% endfor %}
</ul>
@twosixcode
twosixcode / icon.css
Created Sep 27, 2012
Clean way to add icon font using :before pseudoclass
View icon.css
/* Use the following CSS code if you want to have a class per icon */
[class^="icon-"]:before,
[class*=" icon-"]:before,
[class^="icon-"]:after,
[class*=" icon-"]:after {
font-family: 'Pictos';
font-style: normal;
speak: none;
}
.icon-comment:before {
@twosixcode
twosixcode / gist:1988097
Created Mar 6, 2012
Make "Paste and Indent" the default paste in Sublime Text 2
View gist:1988097
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@twosixcode
twosixcode / gist:1694931
Created Jan 28, 2012
Global variables for current uri and current url in ExpressionEngine
View gist:1694931
// add to index.php
// current_url and current_uri global variables
$assign_to_config['global_vars'] = array(
'current_url'=>'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
'current_uri'=>$_SERVER['REQUEST_URI']
);
@twosixcode
twosixcode / .gitignore
Created Jan 28, 2012
.gitignore for ExpressionEngine
View .gitignore
.DS_Store
# Images
images/avatars/
images/captchas/
images/smileys/
images/member_photos/
images/signature_attachments/
images/pm_attachments/
You can’t perform that action at this time.