Skip to content

Instantly share code, notes, and snippets.

View dlucian's full-sized avatar
💭
🦇

Lucian Daniliuc dlucian

💭
🦇
View GitHub Profile
@ibraheem4
ibraheem4 / postgres-brew.md
Last active July 18, 2024 00:18 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@joseluisq
joseluisq / 1README.md
Last active January 3, 2022 13:22
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

Lumen 5 HTTP Exception Handlers with JSON support.

Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.

image

Setup

Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php and app/Http/Middleware/Authenticate.php

@wojteklu
wojteklu / clean_code.md
Last active July 23, 2024 23:58
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

git shortlog -s | sort -nr
@epixoip
epixoip / 8x1080.md
Last active July 17, 2024 08:17
8x Nvidia GTX 1080 Hashcat Benchmarks
@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active July 23, 2024 19:27 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@maxim
maxim / gh-dl-release
Last active July 4, 2024 00:00
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@Stoffo
Stoffo / remove_documents_mongodb.js
Created October 29, 2015 12:29
Remove Documents older than x days in MongoDB
var date = new Date();
var daysToDeletion = 120;
var deletionDate = new Date(date.setDate(date.getDate() - daysToDeletion));
printjson(deletionDate);
var db = db.getSiblingDB('db')
db.getMongo().setSlaveOk();
printjson(db.messages.find({insertDate : {$lt : deletionDate}}).count());
@niqdev
niqdev / rename-branch-github.txt
Last active January 15, 2020 18:17
Rename local and remote branch on GitHub
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@rdempsey
rdempsey / matrix_color_scheme_iterm2
Created July 10, 2015 18:23
Matrix color scheme for iTerm2. Import with script from here: http://ngs.io/2014/05/05/iterm2-color-schemes/
{
'Ansi 7 Color' = {
'Blue Component' = '0.751819';
'Green Component' = '0.859729';
'Red Component' = '0.796432';
};
'Selected Text Color' = {
'Blue Component' = '1.000000';
'Green Component' = '1.000000';
'Red Component' = '1.000000';