Skip to content

Instantly share code, notes, and snippets.

View buchin's full-sized avatar

Mochammad Masbuchin buchin

View GitHub Profile
@buchin
buchin / index.php
Created May 31, 2022 02:22
Shuriken Native Index.php
<?php
/**
* Illuminate/Routing
*
* @source https://github.com/illuminate/routing
* @contributor Muhammed Gufran
* @contributor Matt Stauffer
* @contributor https://github.com/jwalton512
* @contributor https://github.com/dead23angel
<?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
@buchin
buchin / _grid.blade.php
Last active April 24, 2019 14:32
Pasang iklan di yang ditandai dengan kode <!-- Iklan -->
@foreach(collect($images)->shuffle()->take(32)->chunk(4) as $c_image)
<div class="row mb-5 row-eq-height">
@foreach($c_image as $image)
<div class="col-md-3">
<div class="card h-100">
@php
$link = is_active('home') ? route('category', ['slug' => Str::slug($image->snp)]) : '#';
@endphp
<a href="{{ $link }}"><img height="150" onerror="this.onerror=null;this.src='{{ route('thumbr', ['id' => Base64Url\Base64Url::encode($image->turl), 'filetype' => $image->mf]) }}';" class="card-img-top" src="{{ route('thumb', ['id' => Base64Url\Base64Url::encode($image->turl), 'filetype' => $image->mf]) }}" alt="{{ $image->snp }}"></a>
@buchin
buchin / wp.blade.php
Created January 14, 2019 08:28
random author wp
@php
$default_author = collect(['Admin', 'joko', 'bowo']);
$site_url = 'http://example.com/';
$category = isset($argv[2]) ? $argv[2] : 'Uncategorized';
$backdate = isset($argv[1]) ? $argv[1] : date('Y-m-d');
@endphp
{!! '<' . '?' . 'xml version="1.0" encoding="UTF-8"' !!}
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.0/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
<div style="text-align:center;background-color: #eee;padding: 20px 10px 5px 10px; color: blue;"><a href="http://shedhouseplans.eplans.club/barn" style="
text-align: center;
"> <img src="http://www.myshedplans.com/images/shedplans_468x60.gif" alt="MyShedPlans Banner 486x60" border="0"></a>
<h3><a style="color: blue;" href="">More About: Shed House Plans Nz</a></h3>
</div>
<?php
$images = json_decode(file_get_contents('http://tools.dojo.cc/api/trends/p19/images'), true);
foreach($images as $image){
echo '<a href="http://domain.com/tag/'. str_replace(' ', '-', $image['title']) . '">' . <img src="{{ $image['mediaurl'] }}" alt="{{ $image['title'] }}" width="150" onError="this.onerror=null;this.src='http://cars.usermanual.site/wp-content/uploads/2015/09/loading.gif';"> . '</a>, ';
}
<?php
$keywords = json_decode(file_get_contents('http://tools.dojo.cc/api/trends/p19/keywords'), true);
foreach($keywords as $keyword){
echo '<a href="http://domain.com/tag/'. str_replace(' ', '-', $keyword) . '">' . $keyword . '</a>, ';
}
<?php
global $configs;
$configs = new stdClass;
$configs->domain = $_SERVER['SERVER_NAME'];
$configs->timer = 25;
$configs->amazon_tag = 'fregamonl0b-20';
$configs->infolinks = '
<script type="text/javascript">
var infolinks_pid = 405121;
var infolinks_wsid = 0;
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' );
@buchin
buchin / gist:9872710
Last active August 29, 2015 13:57 — forked from titokun/gist:9870770
{% 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>