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 | |
namespace Tests; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
abstract class TestCase extends BaseTestCase | |
{ | |
use CreatesApplication; |
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
# make sure You have installed the infinality patches | |
export INFINALITY_FT_FILTER_PARAMS="8 17 50 17 8" | |
export INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="0" | |
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="55" | |
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="0" | |
export INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="0" | |
export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="20" | |
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="0" | |
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0" |
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 string2ByteArray($string) { | |
return unpack('C*', $string); | |
} | |
function byteArray2String($byteArray) { | |
$chars = array_map("chr", $byteArray); | |
return join($chars); | |
} |
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 { resolve } = require('path') | |
const root = resolve(__dirname, '..') | |
module.exports = { | |
rootDir: root, | |
displayName: 'eslint', | |
runner: 'jest-runner-eslint', | |
testMatch: ['<rootDir>/src/**/*.js', '<rootDir>/config/*.js'], | |
} |
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
# | |
# Ubuntu 18.04 (Bionic Beaver) | |
# | |
# Basic packages i usually install. | |
# | |
# Author: Julius Beckmann <github@h4cc.de> | |
# | |
# Upgraded Script from 17.04: https://gist.github.com/h4cc/09b7fe843bb737c8039ac62d831f244e | |
# Upgraded Script from 16.04: https://gist.github.com/h4cc/fe48ed9d85bfff3008704919062f5c9b |
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 '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 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
# mount volume PWD on host to /app in container. | |
shai@lappy ~/tmp/example-working-docker-compose-environment-vars [master *] ± % cat docker-compose.yml | |
version: "3" | |
services: | |
some_server: | |
... | |
volumes: | |
- $PWD:/app |
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
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char) | |
# |<---- Preferably using up to 50 chars --->|<------------------->| | |
# Example: | |
# [feat] Implement automated commit messages | |
# (Optional) Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# (Optional) Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
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 ExtractTextPlugin = require('extract-text-webpack-plugin') | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin') | |
const extractStyles = new ExtractTextPlugin({ | |
filename: "css/[name].css" | |
}) |
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
# Installing PHP GeoIP on Ubuntu To make GeoIP work on PHP | |
# all the functions in http://php.net/manual/en/book.geoip.php | |
# php5-geoip and GeoCityLite.dat must be installed. | |
apt-get install php5-geoip | |
mkdir /usr/local/share/GeoIP | |
cd /usr/share/local/GeoIP | |
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
gunzip GeoLiteCity.dat.gz | |
service apache2 restart |
NewerOlder