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 | |
| $entities = glob("app/Entities/**/*.php"); | |
| foreach ($entities as $entity) { | |
| $className = str_replace('/', '\\', ucfirst(substr($entity, 0, -4))); | |
| $class = new $className; | |
| dump($class->getTable()); | |
| $columns = collect(DB::select("SHOW COLUMNS FROM `{$class->getTable()}`"))->filter(function ($column) { | |
| return !in_array($column->Field, ['id', 'created_at', 'updated_at', 'deleted_at']); |
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\Rules; | |
| use Illuminate\Contracts\Validation\Rule; | |
| use Twig_Environment; | |
| use Twig_Filter; | |
| use Twig_Loader_Array; | |
| use Twig_Error_Syntax; |
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
| (function() { | |
| let amts = [], dates = []; | |
| Array.from(document.querySelectorAll('div.dh')).forEach(function(el) { | |
| let date_amount = el.querySelector('div.an'); | |
| dates.push(date_amount.querySelector('div:first-child').innerText.split(',')[0]); | |
| amts.push(date_amount.querySelector('div:last-child').innerText.replace('£', '')); | |
| }); | |
| console.log(amts.join("\n")) | |
| console.log(dates.join("\n")); | |
| })(); |
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
| #!/bin/sh | |
| LENGTH=${1:-12} | |
| RANDOM_STRING=`openssl rand -base64 ${LENGTH}` | |
| `echo "${RANDOM_STRING}" | tr -d '\n' | pbcopy` | |
| echo "\033[1;32mRandom Password: \033[0m" | |
| echo "" | |
| echo " ${RANDOM_STRING}" | |
| echo "" |
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
| gulp.task('scripts:search', () => { | |
| return gulp.src('./search-module/index.js', { read: false }) | |
| .pipe(tap((file) => { | |
| file.contents = browserify(file.path, { | |
| debug: true | |
| }).transform(babel, { | |
| presets: ["es2015"], | |
| plugins: ["angularjs-annotate"] | |
| }).bundle(); | |
| })) |
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
| import gulp from 'gulp'; | |
| import sourcemaps from 'gulp-sourcemaps'; | |
| import buffer from 'gulp-buffer'; | |
| import uglify from 'gulp-uglify'; | |
| import tap from 'gulp-tap'; | |
| import browserify from 'browserify'; | |
| import babel from 'babelify'; | |
| gulp.task('build', () => { |
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
| /** | |
| * Returns the value at the given property. | |
| * | |
| * @param {object} - the input object | |
| * @param {string} - the property accessor expression. | |
| * @returns {*} | |
| * @alias module:object-get | |
| * @example | |
| * > objectGet({ animal: 'cow' }, 'animal') | |
| * 'cow' |
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
| ;(function() { | |
| 'use strict'; | |
| angular.module('app').filter('address', Filter); | |
| function Filter($sce) { | |
| return function(input, seperator, defaultValue) { | |
| seperator = seperator || ', '; | |
| defaultValue = defaultValue || ''; |
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
| mixin csrf | |
| div | |
| input(type='hidden', name='_csrf', value=csrfToken) | |
| block | |
| mixin formErrors(form) | |
| errors = form.nonFieldErrors().errors | |
| for error in errors | |
| .alert.alert-error= error |