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 | |
$one->one = 1; | |
$two->two->one = 21; | |
$two->two->two = 22; | |
$three->two->one = 31; | |
$return_obj = object_merge($one, $two, $three); | |
// returns: | |
// Array |
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
// Use built in or binary modules | |
var crypto = require('crypto'); | |
var hash = crypto.createHmac("sha1",key).update(signatureBase).digest("base64"); |
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
var express = require('express') | |
, io = require('socket.io'); | |
var app = express() | |
, server = require('http').createServer(app) | |
, io = io.listen(server); | |
server.listen(3000); | |
io.sockets.on('connection', function(socket) { |
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 | |
class Controller_Twitter extends Controller { | |
public function action_index () { | |
// Load a consumer from config file. | |
$consumer = OAuth_Consumer::factory( Kohana::config( 'oauth.twitter' ) ); |
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 | |
// Resizer and Image Manipulation | |
// Based on: http://forums.laravel.com/viewtopic.php?id=2648 | |
public function post_edit_logo($id) | |
{ | |
$rules = array( | |
'image' => 'image', | |
); |
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 namespace Tmb; | |
use Illuminate\Database\Eloquent\Model as Eloquent; | |
use Illuminate\Validation\Validator; | |
class BaseModel extends Eloquent | |
{ | |
/** | |
* Error message bag |
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
[ | |
{ | |
"name":"Adana", | |
"slug":"adana", | |
"plate_code":1, | |
"districts":[ | |
{ | |
"name":"Alada\u011f", | |
"slug":"aladag" | |
}, |
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 | |
App::after(function($request, $response) | |
{ | |
/** | |
* HTML Minification | |
* https://gist.github.com/zmsaunders/5619519 | |
* https://gist.github.com/garagesocial/6059962 | |
*/ | |
if (Config::get('project.minify.html', false) !== false) |
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 | |
namespace Mayoz\Service\Html; | |
use Illuminate\Html\FormBuilder as IlluminateFormBuilder; | |
class FormBuilder extends IlluminateFormBuilder { | |
/** | |
* An array containing the currently opened form groups. |
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
/*! | |
* Grunt | |
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev | |
*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// Sass |
OlderNewer