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
| SET GLOBAL sql_mode = ''; |
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 | |
| USAGE="$0 [-u <user> -p <password> -h <host> -P <PORT> -d <database> -D <destination/directory/without/trailing/slash>]" | |
| DESTINATION=`pwd` | |
| USER=root | |
| PASS=root | |
| HOST=localhost | |
| PORT=3306 | |
| # SPECIFY HOW LONG TO RETAIN BACKUPS |
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
| cat > /etc/nginx/conf.d/gzip.conf << EOF | |
| gzip_comp_level 5; | |
| gzip_min_length 256; | |
| gzip_proxied any; | |
| gzip_vary on; | |
| gzip_types | |
| application/atom+xml | |
| application/javascript | |
| application/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
| import 'nprogress/nprogress.css' | |
| import NProgress from 'nprogress' | |
| import axios from 'axios' | |
| const calculatePercentage = (loaded, total) => (Math.floor(loaded * 1.0) / total) | |
| const setupUpdateProgress = () => { | |
| axios.defaults.onDownloadProgress = e => { | |
| const percentage = calculatePercentage(e.loaded, e.total) |
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 pushme { | |
| br=`git branch | grep "*"` | |
| params='' | |
| for i in $*; | |
| do | |
| params=" $params $d$i" | |
| done | |
| git add --all |
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
| $sizeUnit: rem; | |
| $marginKey: 'm'; | |
| $paddingKey: 'p'; | |
| $separator: '-'; | |
| $sizes: ( ('none', 0), ('xxs', 0.125), ('xs', 0.25), ('sm', 0.5), ('md', 1), ('lg', 2), ('xl', 4), ('xxl', 8), ); | |
| $positions: ( ('t', 'top'), ('r', 'right'), ('b', 'bottom'), ('l', 'left')); | |
| @function sizeValue($key, $value) { | |
| @return if($key=='none', 0, $value + $sizeUnit); | |
| } |
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 Vue from 'vue' | |
| import moment from 'moment' | |
| Vue.filter('formatDate', function (value) { | |
| if (value) { | |
| return moment(String(value)).format('MM/DD/YYYY hh:mm') | |
| } | |
| }) |
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
| mysqldump -u root -p database --ignore-table=database.table1 --ignore-table=database.table2 > dump.sql |
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\Http; | |
| use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
| class Kernel extends HttpKernel | |
| { | |
| /** | |
| * The application's global HTTP middleware stack. |
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
| # npm cache clean -f | |
| # npm install -g n | |
| # n stable |
OlderNewer