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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Vue.js sample using Google Maps API</title> | |
| <style> | |
| .v-transition { | |
| height: auto; | |
| opacity: 1; |
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 | |
| $finder = Symfony\Component\Finder\Finder::create() | |
| ->notPath('bootstrap/cache') | |
| ->notPath('storage') | |
| ->notPath('vendor') | |
| ->in(__DIR__) | |
| ->name('*.php') | |
| ->ignoreDotFiles(true) | |
| ->ignoreVCS(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
| Model:: | |
| /*Select*/ | |
| select('col1','col2') | |
| ->select(array('col1','col2')) | |
| ->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
| ->addSelect('col3','col4') | |
| ->distinct() // distinct select | |
| /*From*/ |
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 | |
| $finder = Symfony\Component\Finder\Finder::create() | |
| ->files() | |
| ->in(__DIR__) | |
| ->exclude('vendor') | |
| ->notName("*.txt") | |
| ->ignoreDotFiles(true) | |
| ->ignoreVCS(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
| # <name> / <snippet> | |
| # dnsmasq | |
| edit dnsmasq.conf / vi /usr/local/etc/dnsmasq.conf | |
| kill dnsmasq / sudo killall -9 dnsmasq | |
| load dnsmasq / sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| unload dnsmasq / sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| flush DNS caches / sudo discoveryutil udnsflushcaches | |
| # git/hub |
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 | |
| use Illuminate\Database\Seeder; | |
| class PostTagTableSeeder extends Seeder | |
| { | |
| /** | |
| * @var | |
| */ | |
| private $pivotData = []; |
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 | |
| /** | |
| * This is a quick and dirty script. This should NEVER be run on a production server. | |
| * | |
| * Include this script at the bottom of your functions.php file, e.g. | |
| * | |
| * ```php | |
| * // Your functions.php 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
| #!/bin/bash | |
| for site in `wp site list --field=url`; do | |
| wp media regenerate --yes --url=$site | |
| done | |
| ~ |
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\ActiveRecord; | |
| class PostRepository | |
| { | |
| private $cache; | |
| public function __construct(Cache $cache) | |
| { | |
| // Any set() / get() cache implementation. |
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 | |
| $finder = Symfony\Component\Finder\Finder::create() | |
| ->notPath('bootstrap/cache') | |
| ->notPath('storage') | |
| ->notPath('vendor') | |
| ->in(__DIR__) | |
| ->name('*.php') | |
| ->notName('*.blade.php') | |
| ->ignoreDotFiles(true) |