Skip to content

Instantly share code, notes, and snippets.

@locopine
locopine / macro.md
Created July 12, 2022 09:39 — forked from brunogaspar/macro.md
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup

@locopine
locopine / slash-search.js
Created June 28, 2022 22:16 — forked from caspark/slash-search.js
Google slash search
// ==UserScript==
// @name Google Slash Search
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.google.com/search*
// @grant none
// ==/UserScript==
@locopine
locopine / .env-Swoole
Created April 26, 2022 02:15 — forked from kiddtang/.env-Swoole
Youtube - Boosts your Laravel Sail
OCTANE_SERVER=swoole
OCTANE_HTTPS=true

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@locopine
locopine / git-force-clone.sh
Created March 23, 2022 22:27 — forked from nottrobin/git-force-clone.sh
git force-clone: clone a repository; if it already exists locally, reset it to a clone of the remote.
#! /usr/bin/env bash
set -euo pipefail
_usage() {
echo "
Usage:
git-force-clone -b branch remote_url destination_path
Example:
@locopine
locopine / xrandr.sh
Created February 25, 2022 20:18 — forked from debloper/xrandr.sh
Add system unrecognized but monitor supported resolution in X
#!/bin/bash
# Copyright (c) 2021 Soumya Deb <debloper@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@locopine
locopine / php-docker-ext
Created January 5, 2022 01:17 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@locopine
locopine / .env
Created November 21, 2021 17:55 — forked from kiddtang/.env
proxy-manager
APP_PORT=48080
FORWARD_DB_PORT=43306
FORWARD_REDIS_PORT=46379
FORWARD_MEILISEARCH_PORT=47700
FORWARD_MAILHOG_PORT=41025
FORWARD_MAILHOG_DASHBOARD_PORT=48025
@locopine
locopine / settings.json
Created August 19, 2021 00:26 — forked from frv-dev/settings.json
[Code Easy - DON'T REMOVE] Settings for VSCode + PHP
{
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 3,
"editor.formatOnSave": true,
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/.hg/store/**": true,
"**/vendor/*/**": true
@locopine
locopine / Install PHP-CS-Fixer.md
Created August 17, 2021 04:02 — forked from realrashid/Install PHP-CS-Fixer.md
How to Install PHP-CS-Fixer on Windows

Installing PHP-CS-Fixer for VsCode on Windows

Install PHP-CS-FIXER Using Composer

composer global require friendsofphp/php-cs-fixer

after successfully installation of PHP-CS-FIXER

now install PHP-CS-FIXER VSCODE Extension