Skip to content

Instantly share code, notes, and snippets.

View deanputney's full-sized avatar

Dean Putney deanputney

View GitHub Profile
<a href="http://forrst.com/activity/from/friends">http://forrst.com/activity/from/friends</a>
<a href="http://jsfiddle.net/">http://jsfiddle.net/</a>
<a href="http://jscompress.com/">http://jscompress.com/</a>
<a href="http://jsbeautifier.org/">http://jsbeautifier.org/</a>
<a href="http://news.ycombinator.com/news">http://news.ycombinator.com/news</a>
<a href="http://www.resizer.co/">http://www.resizer.co/</a>
<a href="http://aquantum-demo.appspot.com/file-upload">http://aquantum-demo.appspot.com/file-upload</a>
<a href="http://offliberty.com/">http://offliberty.com/</a>
<a href="https://www.google.com/a/cpanel/chateausazerac.com/UserHub">https://www.google.com/a/cpanel/chateausazerac.com/UserHub</a>
<a href="http://www.sounddogs.com/">http://www.sounddogs.com/</a>
@deanputney
deanputney / wpinstall
Created April 9, 2012 22:12
Download and install the latest version of WordPress in any directory
#!/bin/bash
wget http://wordpress.org/latest.zip && unzip latest.zip && mv wordpress/* . && rm -r wordpress latest.zip
@deanputney
deanputney / gist:2933760
Created June 15, 2012 00:09
Convert video for Apple TV
#!/bin/bash
read -p "Input file: " input_file;
read -p "Title: " title;
read -p "Show name: " show;
read -p "Episode ID: " eid;
read -p "Season: " season;
read -p "Episode: " episode;
ffmpeg -i "$input_file" -r 30 -vcodec libx264 -acodec libfaac -threads 0 -ar 48000 -ab 128k -ac 2 -y -crf 21 \
@deanputney
deanputney / giffer.sh
Created August 23, 2012 04:39
Giffer - Make gifs from any video
#!/bin/bash
# Installation:
#
# Get yourself ffmpeg and imagemagick.
# brew install ffmpeg
# brew install imagemagick
#
# I put this script at ~/script/giffer.sh and aliased it to giffer.sh
# alias giffer=/Users/<your_username>/scripts/giffer.sh
<div id="ad_example">
<noscript id="ad_example_noscript">
<!-- Ad content goes here, whatever you need -->
<script type="text/javascript" src="http://example.com/ad_script.js"> </script>
<i>This is an advertisement</i>
</noscript>
<script type="text/javascript">
document.write(document.getElementById('ad_example_noscript').text);
</script>
</div>
@deanputney
deanputney / facebookssrdiff2012
Created December 7, 2012 08:02
Facebook SRR proposal diff
3c3
< Date of Last Revision: June 8, 2012.
---
> Date of Last Revision: November XX/December XX, 2012.
44c44
< You will not use your personal timeline for your own commercial gain (such as selling your status update to an advertiser).
---
> You will not use your personal timeline primarily for your own commercial gain, and will use a Facebook Page for such purposes.
145c145
< If you create or administer a Page on Facebook, you agree to our Pages Terms.
@deanputney
deanputney / gist:5436913
Created April 22, 2013 17:25
Diff for OpenLayers.js in Ushahidi for the panopticon-ushahidi theme: https://github.com/mustardhamsters/panopticon-ushahidi
81c81
< b=OpenLayers.Lang.defaultCode);OpenLayers.Lang.code=b},translate:function(a,b){var c=OpenLayers.Lang[OpenLayers.Lang.getCode()];(c=c&&c[a])||(c=a);b&&(c=OpenLayers.String.format(c,b));return c}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Util=OpenLayers.Util||{};OpenLayers.Util.getElement=function(){for(var a=[],b=0,c=arguments.length;b<c;b++){var d=arguments[b];"string"==typeof d&&(d=document.getElementById(d));if(1==arguments.length)return d;a.push(d)}return a};OpenLayers.Util.isElement=function(a){return!!(a&&1===a.nodeType)};OpenLayers.Util.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)};OpenLayers.Util.removeItem=function(a,b){for(var c=a.length-1;0<=c;c--)a[c]==b&&a.splice(c,1);return a};
---
> b=OpenLayers.Lang.defaultCode);OpenLayers.Lang.code=b},translate:function(a,b){var c=OpenLayers.Lang[OpenLayers.Lang.getCode()];(c=c&&c[a])||(c=a);b&&(c=OpenLayers.String.format(c,b));return c}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Util=OpenLayers.
Futures
- Industry
- - Level 1 HIDDEN
- - Level 2 HIDDEN
- - Level 3 HIDDEN
- Policy
- - Level 1 HIDDEN
- - Level 2 HIDDEN
- - Level 3 HIDDEN
- whatever else
// Get all active top level categories
$parent_categories = array();
$all_parents = ORM::factory('category')
->where('category_visible', '1')
->where('parent_id', '0')
->find_all();
foreach ($all_parents as $category)
{
// Get The Children
function new_excerpt_more( $more ) {
return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">[...]</a>';
}
add_filter( 'excerpt_more', 'new_excerpt_more' );