Skip to content

Instantly share code, notes, and snippets.

View dlucian's full-sized avatar
💭
🦇

Lucian Daniliuc dlucian

💭
🦇
View GitHub Profile
@dlucian
dlucian / vs-code-defaults.json
Last active August 4, 2020 15:55
VS Code workspace defaults JSON
{
"editor.detectIndentation": false,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"[javascript]": {
"editor.tabSize": 2
},
"[css]": {
"editor.tabSize": 2
},
@dlucian
dlucian / pre-commit.sh
Created January 30, 2022 15:19
Pre-commit script that checks php parse, phpcs (+auto-fix) and phpmd for the committing files
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )"
PROJECT=`php -r "echo dirname(dirname(realpath('$0')));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
if [ "$#" -eq 1 ]
then
oIFS=$IFS
@dlucian
dlucian / json-literal.txt
Created February 11, 2022 11:14
Regular expression to match JSON and Javascript Literal object
^{\s*(\s*"?([a-zA-Z0-9]+)"?:\s*"\S+",?)+\s*"?([a-zA-Z0-9]+)"?:\s*"\S+"\s*}
@dlucian
dlucian / top-1000-websites.json
Created December 20, 2022 04:02
Top 1000 Websites
[
{
"position": 1,
"domain": "youtube.com",
"count": 361515143,
"etv": 460411425.18914586
},
{
"position": 2,
"domain": "facebook.com",