Skip to content

Instantly share code, notes, and snippets.

View armorasha's full-sized avatar

Raja Palanivel armorasha

  • Adelaide, Australia
View GitHub Profile
@armorasha
armorasha / config.php_cs
Last active March 26, 2021 14:42
Your "php-cs-fixer.config": ".php_cs;.php_cs.dist" file. Just download this file and use it. I prefer to keep the file name config.php_cs
<?php
return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'indentation_type' => true,
// for indentation to work: 1 of 2. Works!
'array_indentation' => true,
@armorasha
armorasha / PHP-CS-Fixer_settings.txt
Last active June 30, 2020 15:43
PHP-CS-Fixer settings you need to add to your VS Code's existing settings.json file (2020)
// Add these settings to your VS Code's existing settings.json file (2020)
"php.suggest.basic": false,
"[php]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "junstyle.php-cs-fixer",
},
"php-cs-fixer.executablePath": "C:\\Users\\your_user_name_here\\AppData\\Roaming\\Composer\\vendor\\bin\\php-cs-fixer.bat",
"php-cs-fixer.executablePathWindows": "C:\\Users\\your_user_name_here\\AppData\\Roaming\\Composer\\vendor\\bin\\php-cs-fixer.bat",
"php-cs-fixer.onsave": true,
"php-cs-fixer.rules": "@PSR2",
@armorasha
armorasha / sleep_sort.py
Last active March 5, 2023 12:24 — forked from maxcountryman/sleep_sort.py
Sleep sort in Python 3.8 multi-threading.
# used Python 3.8
import _thread
from time import sleep
items = [2, 4, 5, 2.5, 1, 7]
def sleep_sort(i):
sleep(i)
print(i)