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
<html> | |
<head> | |
<script src="http://apps.littlebitscloud.cc/api-http/littleBitsAPI.min.js"></script> | |
<script> | |
function set_auth(form) { | |
var v = { | |
access_token: form.access_token.value, | |
device_id: form.cloudBit_id.value | |
} | |
window.littleBitsAPI = littleBitsAPI.defaults(v) |
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 | |
$access_token = 'YOUR_TOKEN'; | |
$cloudBit_ID = 'YOUR_CLOUDBIT_ID'; | |
init_api_request($access_token, $cloudBit_ID); | |
function handle_input($ch, $data) { | |
// remove "data:" from beginning of SSE data to leave just json | |
$data = preg_replace('/^data:(.*)$/mi', '$1', $data); | |
// decode json to get php object |
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
jQuery(function($) { | |
if ( !$('#new_request') ) return | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
var match, fieldID; | |
for (var i=0; i<vars.length; i++) { | |
var pair = vars[i].split("="); | |
match = pair[0].match(/^request_fields\[([a-z_\d]+)\]$/) | |
if (match) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"> | |
<style> | |
/* define the floating animation; just a simple position shift */ | |
@keyframes cloud_floating { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"> | |
<style> | |
/* define the floating animation; just a simple position shift */ | |
@-webkit-keyframes cloud_floating { | |
0% { left: -5%; } |
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
ajax-thumbnail-rebuild http://plugins.svn.wordpress.org/ajax-thumbnail-rebuild/trunk/ | |
editorial-calendar http://plugins.svn.wordpress.org/editorial-calendar/trunk/ | |
custom-metadata http://plugins.svn.wordpress.org/custom-metadata/trunk/ | |
#email-address-encoder http://plugins.svn.wordpress.org/email-address-encoder/trunk/ | |
#posts-to-posts http://plugins.svn.wordpress.org/posts-to-posts/trunk/ | |
#rich-text-tags http://plugins.svn.wordpress.org/rich-text-tags/trunk/ | |
simple-page-ordering http://plugins.svn.wordpress.org/simple-page-ordering/trunk/ | |
sld-custom-content-and-taxonomies http://plugins.svn.wordpress.org/sld-custom-content-and-taxonomies/trunk/ | |
#taxonomy-terms-order http://plugins.svn.wordpress.org/taxonomy-terms-order/trunk/ | |
#wp-mail-smtp http://plugins.svn.wordpress.org/wp-mail-smtp/trunk/ |
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
# directory listing shortcut | |
alias ll='ls -la' | |
# hardening wordpress file permissions shortcuts | |
alias setpermd='find . -type d -exec chmod 755 {} \;' | |
alias setpermf='find . -type f -exec chmod 644 {} \;' | |
# set vi as svn propeditor | |
export SVN_EDITOR=vi |
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
add_action( 'init', 'sld_prepopulate' ); | |
function sld_prepopulate() { | |
$terms = array( | |
'term1', | |
'term2', | |
'Faculty' => array( | |
'booze', | |
'jeans', | |
), |
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 | |
/* | |
* This class returns you an object that you can foreach() loop through, passing regular | |
* get_posts() args, and the results will be grouped by category or custom taxonomy. | |
* It's designed right now to work with posts in only one category [taxonomy term]. | |
* | |
* Usage: | |
$args = array( | |
'taxonomy' => 'my_taxonomy', |
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 // quick WordPress custom URL variables for /en/page-name & /fr/page-name | |
function flush_rewrite() { | |
flush_rewrite_rules( false ); | |
} | |
add_action( 'init', 'flush_rewrite' ); | |
function my_insert_query_vars( $vars ) { | |
array_push( $vars, 'lang' ); | |
return $vars; |
NewerOlder