This file contains hidden or 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
| // create array for hold all dogs data | |
| // just loop by get data from getNames() | |
| // getNames() is generator so it's simple loop | |
| // and we just need 5 dogs only | |
| // each dog will name as value | |
| // echo all dogs as json |
This file contains hidden or 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
| // This is function for function | |
| // Usage like http://php.net/manual/en/function.get-called-class.php | |
| function get_called_func() | |
| { | |
| $trace = array_slice(debug_backtrace(), -2, 1); | |
| return $trace['function']; | |
| } |
This file contains hidden or 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 data = []; | |
| data.push(['S', 'M', 'L']); | |
| data.push(['RED', 'YELLOW']); | |
| data.push(['IRON', 'COTTON']); | |
| data.push(['ccc', 'ddd']); | |
| // For clone array | |
| Array.prototype.clone = function() { | |
| return this.slice(0); | |
| }; |
This file contains hidden or 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 App\Traits; | |
| use Illuminate\Database\Eloquent\Relations\Relation; | |
| use Illuminate\Database\Eloquent\Relations\HasOneOrMany; | |
| use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
| use Illuminate\Database\Eloquent\Relations\HasManyThrough; | |
| use Closure; | |
| use Exception; |
This file contains hidden or 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 | |
| /** | |
| * Copyright @ 2016 by Nimit Suwannagate <ethaizone@hotmail.com>. All rights reserved. | |
| */ | |
| // Run this file in cli mode for best view. | |
| // Try to edit this one. | |
| $maxNumber = 500000000000; |
This file contains hidden or 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
| // Create class | |
| function Cart(){ | |
| // constructur | |
| // protected variable | |
| var myProtected = 'secret'; | |
| // protected method | |
| var protectedFunction = function() { |
This file contains hidden or 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 | |
| set_time_limit(0); | |
| // โหลด simple_html_dom.php มาจาก http://simplehtmldom.sourceforge.net/ | |
| include 'simple_html_dom.php'; | |
| function saveFile($url, $file) { | |
| if(file_exists($file)) { |
This file contains hidden or 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
| /** | |
| * Example Duck punching in Javascript | |
| * @author Nimit Suwannagate <ethaizone@hotmail.com> | |
| */ | |
| // create class calculator | |
| function Calculator() { | |
| } | |
| // add method |
This file contains hidden or 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
| ; Auto typer from file | |
| ; Write by EThaiZone @ 2016 | |
| ; For fake code typing. lol | |
| ; Press Ctrl+F11 to start/stop | |
| ; Press F11 to pause/resume | |
| #MaxThreads 2 | |
| #MaxThreadsPerHotkey 2 | |
| PressKey := true |
This file contains hidden or 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 | |
| // android store | |
| if (preg_match('#android#i', $_SERVER ['HTTP_USER_AGENT'])) { | |
| header('Location: market://details?id=com.google.android.apps.maps'); | |
| exit; | |
| } | |
| // ios | |
| if (preg_match('#(iPad|iPhone|iPod)#i', $_SERVER ['HTTP_USER_AGENT'])) { |