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
| Route::post('ajax',function(){ | |
| if(Request::ajax()) | |
| { | |
| $input = array( | |
| 'password' => Input::get('password') | |
| ); | |
| $rules = array( | |
| 'password' => 'required' | |
| ); |
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 | |
| class BlogController extends Controller | |
| { | |
| /** | |
| * Posts | |
| * | |
| * @return void | |
| */ | |
| public function showPosts() |
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
| body::before { | |
| content:""; | |
| position:fixed; | |
| background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAOEAgMAAADMAyBpAAAAA3NCSVQICAjb4U/gAAAACVBMVEX///9mmcxmmcw+elmfAAAAA3RSTlMAd/+3CsRiAAAACXBIWXMAAAsSAAALEgHS3X78AAAAFnRFWHRDcmVhdGlvbiBUaW1lADA5LzAyLzExT1Br7wAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAs2SURBVHic7duxrV1FGEZR44CAEoiIqcL1uAqXQAkEBOAqcXZe4OBMNHtJ3wRLVzIXbY3+uW+S+fTp0x+fPo+XBBIcAgkOgQSHQIJDIMEhkOAQSHAIJDB833q9Nlk7htusAIEEh0CCQyDBIZDgEEhwCCQw3L4VS2uTtWO4zQoQSHAIJDgEEhwCCQ6BBIdAAsPtW7G0Nlk7htusAIEEh0CCQyDBIZDgEEhwCCQw3L4VS2uTtWO4zQoQSHAIJDgEEhwCCQ7Px1/++/Avv//14b/5+uX5h1//ob7x9cvzDz/+o5//r15+4+Nmff7+4V/+/PtD1vdvzz/89i/1je/fnn/48R/9/H/18hu7wR+sTdbJZO036/039tfwiECCQyDBIZDgEEhwCCQ4BBIYbt+KpbXJ2jHcZgUIJDgEEhwCCQ6BBIdAgkMggeH2rVham6wdw21WgECCQyDBIZDgEEhwCCQ4BBIYbt+KpbXJ2jHcZgUIJDgEEhwCCQ6BBIdAgkMggeH2rVham6wdw21WgECCQyDBIZDgEEhweD4Cb7w6r8KA14N7ycqsTdbJZO036/039tfwiECCQyDBIZDgEEhwCCQ4BBIYbt+KpbXJ2jHcZgUIJDgEEhwCCQ6BBIdAgkMggeH2rVham6wdw21WgECCQyDBIZDgEEhwCCQ4BBIYbt+KpbXJ2jHcZgUIJ |
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
| <Vendor Name> | |
| - Modules | |
| - Blog | |
| - Repository | |
| --Doctrine(if doctrine is the orm) | |
| --BlogRepository.php | |
| --Entities | |
| - Blog.php | |
| --Proxies | |
| --Eloquent(If eloquent is the orm) |
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\Helpers\Elasticsearch; | |
| use Illuminate\Database\Eloquent\Collection; | |
| use Illuminate\Support\Facades\Paginator; | |
| class ElasticCollection extends Collection { | |
| protected $response; |
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 | |
| function codeGenerator($length) | |
| { | |
| $az = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZMULTIPAY'; | |
| $azr = rand(0, 51); | |
| $azs = substr($az, $azr, 10); | |
| $stamp = hash('sha256', time()); | |
| $mt = hash('sha256', mt_rand(5, 20)); | |
| $alpha = hash('sha256', $azs); |
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
| #!/usr/bin/env bash | |
| if [ -z $1 ] | |
| then | |
| echo "serve www.domain.com /path" | |
| exit 1 | |
| fi | |
| if [ -z $2 ] | |
| then |
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 crypto = require('crypto'); | |
| var key = 'MySecretKey12345'; | |
| var iv = '1234567890123456'; | |
| var cipher = crypto.createCipheriv('aes-128-cbc', key, iv); | |
| var decipher = crypto.createDecipheriv('aes-128-cbc', key, iv); | |
| var text = 'plain text'; | |
| var encrypted = cipher.update(text, 'utf8', 'binary'); | |
| encrypted += cipher.final('binary'); | |
| hexVal = new Buffer(encrypted, 'binary'); |
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
| _processInstructionItems(employerId, programs) | |
| { | |
| return new Promise((resolve, reject) => { | |
| let self = this; | |
| let listOfPrograms = []; | |
| _.forEach(programs, item => { | |
| Program.find(item.id).then(programData => { | |
| this._processProgramItemCode(employerId, item, programData).then(programItem => { | |
| listOfPrograms.push(programItem) | |
| }) |
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
| private function csvToArray($filename='', $delimiter=',') | |
| { | |
| $rows = array_map('str_getcsv', file($filename)); | |
| $header = array_shift($rows); | |
| $csv = array(); | |
| foreach ($rows as $row) { | |
| if(count($row) != count($header)) { | |
| dd($row); | |
| } |
OlderNewer