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 | |
//let's get some tweets!! | |
//first, let's see if I've got the data already cached | |
$tweets = get_transient("tweets"); | |
//dang it! it looks like I might not. let's grab some tweets from the Twitter API | |
if( !$tweets ) { |
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
$('.section').waypoint(function(event, direction) { | |
if (direction === 'down') { | |
} else { | |
} | |
}); |
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
mklink /d "C:\Users\clark\AppData\Roaming\Sublime Text 2\Packages\User" "C:\Users\clark\Dropbox\Sublime\Packages\User" |
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
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation' |
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
<!-- the following shorthand --> | |
html:5>div.container>nav.main>li.item*4>a | |
<!-- expands into this clean markup--> | |
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> |
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
{ | |
// The tab key will cycle through the settings when first created | |
// Visit http://wbond.net/sublime_packages/sftp/settings for help | |
// sftp, ftp or ftps | |
"type": "sftp", | |
"save_before_upload": true, | |
"upload_on_save": false, | |
"sync_down_on_open": false, |
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 (is_page('Contact')) { | |
wp_register_script( 'contact-form', 'http://ajax.googleapis.com/contact-form.js'); | |
wp_enqueue_script( 'contact-form' ); | |
} | |
?> |
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
update_post_meta( $post_id, '_wp_page_template', 'page-contact.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
<snippet> | |
<content><![CDATA[ | |
<?php \$${1:query} = new WP_Query('${3:posts_per_page=5}'); ?> | |
<?php while (\$${1:query}->have_posts()) : \$${1:query}->the_post(); ?> | |
${3:// do something} | |
<?php endwhile; ?> | |
]]></content> | |
<tabTrigger>wpq</tabTrigger> | |
<description>WP_Query with php enclosures</description> | |
</snippet> |
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
<snippet> | |
<content><![CDATA[ | |
\$${1:query} = new WP_Query('${2:posts_per_page=5}'); | |
while (\$${1:query}->have_posts()) : \$${1:query}->the_post(); | |
${3:// do something} | |
endwhile; | |
]]></content> | |
<tabTrigger>wpq</tabTrigger> | |
<scope>source.php</scope> | |
<description>WP_Query basic loop</description> |