Skip to content

Instantly share code, notes, and snippets.

View pije76's full-sized avatar

panjianom pije76

View GitHub Profile
@pije76
pije76 / Dupline
Created July 5, 2014 20:44 — forked from ruel/Dupline
#!/usr/bin/perl
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
{% api %}
{% for index, item in api %}
{{ item.link | url_to_hyphen | build_permalink_for 2 }}
{% endfor%}
@pije76
pije76 / single.php
Last active August 29, 2015 14:06 — forked from buchin/single.php
<?php
// taruh ini dalam the loop
// post id adalah id post yang akan di exclude
if($post->ID != 5 && $post->ID != 10){
echo spp(single_post_title(), 'template.html');
}
?>
@pije76
pije76 / header.php
Last active August 29, 2015 14:06 — forked from buchin/header.php
<?php
if(is_search()){
echo spp(get_search_query(), 'metadesc.html')
}
?>
DELETE * FROM `images` where local_url = '';
@pije76
pije76 / filters.php
Last active August 29, 2015 14:06 — forked from buchin/filters.php
App::missing(function($exception)
{
return Redirect::to('/');
});
@pije76
pije76 / routes.php
Last active August 29, 2015 14:06 — forked from buchin/routes.php
<?php
Route::get('seed', function(){
Artisan::call('db:seed');
});
@pije76
pije76 / video.html
Last active August 29, 2015 14:06 — forked from buchin/video.html
{% video %}
{% for index, v in videos %}
<iframe class="youtube-player" type="text/html" width="560" height="315" src="http://www.youtube.com/embed/{{ v.link | get_video_id }}" frameborder="0">
</iframe>
<p><img src="http://img.youtube.com/vi/{{ v.link | get_video_id }}/hqdefault.jpg" align="left"/>{{ v.title }}.
<br>
<strong>Download {{ v.title }}</strong>
<a href="http://keepvid.com/?url={{ v.link }}">MP4</a> |
<a href="http://keepvid.com/?url={{ v.link }}">FLV</a> |
<a href="http://keepvid.com/?url={{ v.link }}">3GP</a> |
{% api %}{% image %}
{% for index, item in api%}
{% for imageindex, image in images %}
{% if index < 5 %}
{% if index == imageindex %}
<div class="entry clearfix">
<a href="{{ item.link }}" rel="nofollow" title="{{ item.title }}"><img src="{{ image.mediaurl }}" alt="{{ image.title }}"></a>
<h2 class="post-title"><a rel="nofollow" href="{{ item.link }}" title="{{ item.title }}">{{ item.title }}</a></h2>
@pije76
pije76 / functions.php
Last active August 29, 2015 14:06 — forked from buchin/functions.php
function fb_change_search_url_rewrite() {
if ( is_search() && ! empty( $_GET['s'] ) ) {
$keywords = get_query_var( 's' );
list($first_word) = explode(' ', trim($keywords));
wp_redirect( home_url( $first_word ) . urlencode( $keywords ) );
exit();
}
}
add_action( 'template_redirect', 'fb_change_search_url_rewrite' );