react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);
2) get requireAccess func => bindCheckAuth to redux
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);
2) get requireAccess func => bindCheckAuth to redux
var EmbeddedGist = React.createClass({ | |
propTypes: { | |
gist: React.PropTypes.string.isRequired, // e.g. "username/id" | |
file: React.PropTypes.string // to embed a single specific file from the gist | |
}, | |
statics: { | |
// Each time we request a Gist, we'll need to generate a new | |
// global function name to serve as the JSONP callback. | |
gistCallbackId: 0, |
<?php | |
/* Thumbnail upscale | |
** source | |
** http://alxmedia.se/code/2013/10/thumbnail-upscale-correct-crop-in-wordpress/ | |
** ------------------------------------ */ | |
function alx_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){ | |
if ( !$crop ) return null; // let the wordpress default function handle this | |
$aspect_ratio = $orig_w / $orig_h; |
angular.module('yourModule') | |
.directive('tabsSwipable', ['$ionicGesture', function($ionicGesture){ | |
// | |
// make ionTabs swipable. leftswipe -> nextTab, rightswipe -> prevTab | |
// Usage: just add this as an attribute in the ionTabs tag | |
// <ion-tabs tabs-swipable> ... </ion-tabs> | |
// | |
return { | |
restrict: 'A', | |
require: 'ionTabs', |
<?php // File location: /wp-content/themes/my-theme/src/Models/ | |
namespace App\Models; | |
use Illuminate\Database\Eloquent\Model as Eloquent; | |
class Car extends Eloquent | |
{ | |
protected $table = 'cars'; | |
protected $primaryId = 'id'; |
var socketId = null; | |
var channel = null; | |
Pusher.logToConsole = true; | |
pusher = new Pusher('xxx', { | |
cluster: 'ap1', | |
authEndpoint: '/pusher_auth.php', //custom auth file | |
encrypted: false | |
}); | |
// channel = pusher.subscribe('tomicek-subscribe'); //join the tomicek-subscribe channel | |
// autentikasi hanya terjadi pada prefix presence-* dan private-* |
// https://developer.mozilla.org/en-US/docs/Node_server_without_framework | |
var http = require('http'); | |
var fs = require('fs'); | |
var path = require('path'); | |
http.createServer(function (request, response) { | |
console.log('request starting...'); | |
var filePath = '.' + request.url; | |
if (filePath == './') |
<!DOCTYPE html> | |
<HTML dir='ltr'> | |
<head> | |
<!-- cache --> | |
<meta content='public' http-equiv='Cache-control'/> | |
<meta content='private' http-equiv='Cache-control'/> | |
<meta content='no-cache' http-equiv='Cache-control'/> | |
<meta content='no-store' http-equiv='Cache-control'/> | |
<!-- cache --> | |
<include expiration='7d' path='*.css'></include> |