File type: PHP
Program: wsl
Arguments: php /ubuntu/path/to/php-cs-fixer fix /ubuntu/path/to/project/$/FileRelativePath$
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
add_newline = false | |
format = """ | |
$directory\ | |
$git_branch\ | |
$git_commit\ | |
$git_state\ | |
$git_metrics\ | |
\n\ | |
$character""" |
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
{ | |
"preset": "laravel", | |
"rules": { | |
"fully_qualified_strict_types": true, | |
"clean_namespace": true, | |
"no_superfluous_phpdoc_tags": true, | |
"ordered_imports": { | |
"imports_order": ["class", "function", "const"], | |
"sort_algorithm": "alpha" | |
}, |
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
## Simple Usage: docker build -t web . && docker run -p 80:8080 -it --name="web" web | |
FROM alpine:latest | |
LABEL Maintainer="Tim de Pater <[email protected]>, Ozan Akman <[email protected]>" \ | |
Description="Lightweight Nginx & PHP container based on Alpine Linux." | |
# trust this project public key to trust the packages. | |
ADD https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub | |
# make sure you can use HTTPS |
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
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt -y install php7.4 | |
php -v | |
sudo apt-get install -y php7.4-{curl,mbstring,mcrypt,opcache,xml,readline,zip,gd} |
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
/** | |
* Originally created by: https://github.com/mdunham/delete-fb-messages | |
* Edited for the latest UI changes by Ozan Akman | |
*/ | |
(function($){ | |
var | |
stepOne = function(){ | |
if (null !== $('div[aria-label="Conversation actions"]')) { | |
$('div[aria-label="Conversation actions"]').click(); |
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
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
alias cdr="cd ~/Repositories" | |
alias phpunit="./vendor/bin/phpunit" | |
alias unixtime="date +%s" | |
alias c="clear" | |
gc() { |
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 | |
$directory = '/folder/name/etc'; | |
$length = 100; | |
$command = 'find "' . $directory . '" -type f | shuf -n ' . $length . ';'; | |
exec($command, $paths); | |
// $paths will contain every files with their paths as an array |
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 | |
// Laravel collections - sorting by multiple columns; | |
$collection->sortBy(function ($post) { | |
return sprintf('%s%s', $post->column, $post->relation->column); | |
}); |
NewerOlder