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 Toasted from 'vue-toasted'; | |
import i18n from '@/i18n'; | |
Vue.use(Toasted); | |
export default { | |
notify(msg, opts = {}) { | |
const providerType = opts.provider || 'toast'; | |
const level = opts.level || null; |
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 axios from 'axios'; | |
import { Notifier } from '@/plugins/notifier'; | |
import isString from 'lodash/isString'; | |
import jwtDecode from 'jwt-decode'; | |
import router from '@/router'; | |
const routeBackToKey = 'routeBackTo'; | |
const tokenUpdateEndpoint = 'token/refresh'; |
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
# Color functions | |
function RED { echo -e "\e[91m$1\e[0m"; } | |
function DARK_RED { echo -e "\e[31m$1\e[0m"; } | |
function YELLOW { echo -e "\e[93m$1\e[0m"; } | |
function DARK_YELLOW { echo -e "\e[33m$1\e[0m"; } | |
function GREEN { echo -e "\e[92m$1\e[0m"; } | |
function DARK_GREEN { echo -e "\e[32m$1\e[0m"; } | |
function CYAN { echo -e "\e[96m$1\e[0m"; } | |
function DARK_CYAN { echo -e "\e[36m$1\e[0m"; } | |
function BLUE { echo -e "\e[94m$1\e[0m"; } |
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 | |
workPath="/var/www/" | |
gitPath="/var/www/repos/reponame.git" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ "production" == "$branch" ]; then | |
git --work-tree="${workPath}production" --git-dir="${gitPath}" checkout -f $branch |
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 | |
usort($aObjects, function($a, $b) { | |
$a = $a->getDate(); | |
$b = $b->getDate(); | |
if ($a == $b) { | |
return 0; | |
} | |
return ($a < $b) ? -1 : 1; | |
}); |
This file has been truncated, but you can view the full 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
-- phpMyAdmin SQL Dump | |
-- version 4.3.13 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: 127.0.0.1 | |
-- Generation Time: Nov 06, 2016 at 03:06 PM | |
-- Server version: 5.6.17 | |
-- PHP Version: 5.5.36 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
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
-- phpMyAdmin SQL Dump | |
-- version 4.3.13 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: 127.0.0.1 | |
-- Generation Time: Nov 06, 2016 at 03:03 PM | |
-- Server version: 5.6.17 | |
-- PHP Version: 5.5.36 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
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
-- phpMyAdmin SQL Dump | |
-- version 4.3.13 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: 127.0.0.1 | |
-- Generation Time: Nov 06, 2016 at 02:58 PM | |
-- Server version: 5.6.17 | |
-- PHP Version: 5.5.36 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
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
/** | |
* Parse uri | |
* @param {string} uri | |
* @return {object} | |
*/ | |
var parseUri = function(uri) { | |
var el = document.createElement('a'); | |
el.href = uri; | |
var query = {}; | |
var qrs = el.search.substring(1).split('&'); |