Skip to content

Instantly share code, notes, and snippets.

View dlucian's full-sized avatar
💭
🦇

Lucian Daniliuc dlucian

💭
🦇
View GitHub Profile
@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",
@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 / 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 / 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 / GPG-GitHub-Desktop.md
Created May 23, 2018 05:59
Setup GPG with GitHub Desktop

Via Daniel Müller:

On Mac OS X you could do:

echo no-tty >> ~/.gnupg/gpg.conf
git config --global gpg.program $(which gpg)
git config --global commit.gpgsign true
@dlucian
dlucian / MACOS-DEV.md
Last active February 25, 2018 14:29
MacOS Development Setup

Install MacOS

Updgrade to High Sierra if needed.

Remove unused items in the Dock, then move the Dock to the left and make it autohide.

Make sure iCloud Drive is configured as it will take a while to sync information.

Install Basic Tools & Applications

@dlucian
dlucian / git-tricks.md
Last active November 21, 2017 12:58
Git Magic Tricks

Useful git operations in a developer's daily work

Undo all changes since last commit

Source

git reset HEAD --hard
git clean -fd
@dlucian
dlucian / do_not_log.conf
Created June 30, 2016 11:53 — forked from kfl62/do_not_log.conf
nginx configuration file, (do not log robots.txt and favicon.ico requests)
# Designed to be included in any server {} block.
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
@dlucian
dlucian / macbook.md
Last active April 20, 2016 14:20
MacBook / OS-X Configs

Sublime (User) settings:

{
	"draw_white_space": "selection",
	"tab_size": 4,
    "translate_tabs_to_spaces": true,
    "open_files_in_new_window": false
}