This file contains 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 VueApollo from "vue-apollo"; | |
import ApolloClient from "apollo-boost"; | |
Vue.use(VueApollo); | |
const token = ""; | |
const apolloClient = new ApolloClient({ | |
uri: "http://localhost:8000/graphql", |
This file contains 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 | |
if (isset($_SERVER['HTTP_ORIGIN'])) { | |
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); | |
header('Access-Control-Allow-Credentials: true'); | |
header('Access-Control-Max-Age: 86400'); | |
} | |
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { | |
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) { |
This file contains 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 isSequencialArray($arr) | |
{ | |
return is_array($arr) && array_keys($arr) === range(0, count($arr) - 1); | |
} |
This file contains 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
module.exports = { | |
extends: ['@commitlint/config-conventional'] | |
} |
This file contains 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
const path = require('path'); | |
const webpack = require('webpack'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin'); | |
const { VueLoaderPlugin } = require('vue-loader'); | |
const isProduction = (process.env.NODE_ENV === 'production'); | |
module.exports = { |
This file contains 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 | |
WEBDIR=/home/web/public/ | |
RANDOM_NAME=$(cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) | |
echo "<?php opcache_reset(); ?>" > ${WEBDIR}${RANDOM_NAME}.php | |
curl http://localhost/${RANDOM_NAME}.php | |
rm ${WEBDIR}${RANDOM_NAME}.php | |
echo "Opcache reseted" |
This file contains 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 Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
use Doctrine\ORM\Query\Lexer; | |
use Doctrine\ORM\Query\Parser; | |
use Doctrine\ORM\Query\SqlWalker; | |
class Cast extends FunctionNode | |
{ | |
private $expr1; |
This file contains 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 | |
# | |
# description: DevShelf service | |
# processname: node | |
# pidfile: /var/run/devshelf.pid | |
# logfile: /var/log/devshelf.log | |
# | |
# Based on https://gist.github.com/jinze/3748766 | |
# | |
# To use it as service on Ubuntu: |