Skip to content

Instantly share code, notes, and snippets.

View yakubenko's full-sized avatar
👽
Eat. Sleep. Code.

Stanislav Yakubenko yakubenko

👽
Eat. Sleep. Code.
View GitHub Profile
@fians
fians / TestCase.php
Created September 5, 2020 16:45
Warning: assertExactJson() doesn't respect order of elements on Laravel v7.x (or older)
<?php
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
@sorenvonsarvort
sorenvonsarvort / a-infinality-w10-config.sh
Last active June 2, 2023 22:41
windows-10-like-font-rendering-config-for-linux
# 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"
@miguelmota
miguelmota / util.php
Last active January 7, 2024 16:07
PHP byte array to hex, hex to byte array, string to hex, hex to string utility functions
<?php
function string2ByteArray($string) {
return unpack('C*', $string);
}
function byteArray2String($byteArray) {
$chars = array_map("chr", $byteArray);
return join($chars);
}
@wldcordeiro
wldcordeiro / jest-eslint.config.js
Created May 25, 2018 02:44
Jest Multi Project Example
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'],
}
@h4cc
h4cc / Makefile
Last active July 11, 2021 10:32
Ubuntu 18.04 Bionic Beaver - Basic packages i usually install
#
# 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
@nikkanetiya
nikkanetiya / axios-nprogress.js
Created September 6, 2017 12:40
NProgress bar with axios
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)
@shaiguitar
shaiguitar / gist:627d52ebc0c03af488477b5d636a8909
Created August 31, 2017 22:27
Using docker compose to mount current working directory dynamically into the container
# 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
@zakkak
zakkak / .git-commit-template
Last active May 15, 2024 00:06 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<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
@alexsasharegan
alexsasharegan / webpack.config.js
Created May 24, 2017 14:51
Webpack config for vue.js with code splitting and css extracted.
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"
})
@vordan
vordan / php-geoip-install.sh
Last active June 27, 2021 09:16
Installing PHP GeoIP on UbuntuTo make GeoIP work on PHP
# 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