Skip to content

Instantly share code, notes, and snippets.

View ziadoz's full-sized avatar

Jamie York ziadoz

View GitHub Profile
@artman41
artman41 / wsl-install_another_distro.md
Last active December 8, 2024 11:58
Instructions on how to install a custom distro in WSL2 (Windows SubSystem for Linux 2)

WSL install another distro

  1. Here are some default vars for the process
ISO_DIR=~/fedora;
ROOTFS_MOUNT_DIR=/mnt/contents

DISTRO_LOCATION=
@calebporzio
calebporzio / artisan_db_open.php
Last active December 22, 2024 11:43
An artisan command for opening the project's database in TablePlus
<?php
Artisan::command('db:open {connection?}', function ($connection = null) {
if (! file_exists('/Applications/TablePlus.app')) {
$this->warn('This command uses TablePlus, are you sure it\'s installed?');
$this->line("Install here: https://tableplus.com/\n");
}
$driver = $connection ?: config('database.default');
$host = config("database.connections.{$driver}.host");
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active March 10, 2025 11:15
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@JohnnyWalkerDigital
JohnnyWalkerDigital / laravel_email_reset_fix.md
Last active October 11, 2022 13:18
Laravel: Setting up password reset to work as expected

Here's how set your password reset experience so that the user doesn't have to enter their email address... without altering vendor/core - tested with Laravel 5.8 (should be fine with later versions, too):

1. Create own notification

Firstly create a new notification for your app:

php artisan make:notification ResetPassword

Then open the newly created file: app\Notifications\ResetPassword.php and make the following changes:

@trovster
trovster / development.sh
Last active December 26, 2021 14:33
Starting point for a script to setup development environment (MAMP)
#!/bin/sh
# chmod a+x development.sh
# General functionality
brew install git
brew install openssl
brew install node
brew install npm
brew install yarn
brew install bat
@trovster
trovster / software.sh
Last active January 8, 2020 12:27
Install software via CLI
#!/bin/sh
# chmod a+x software.sh
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/core
brew tap homebrew/cask
brew tap homebrew/cask-drivers
@matt-bailey
matt-bailey / github-pages-custom-domain-gandi-dns-records.md
Last active December 30, 2024 20:25
How to set up DNS records on gandi.net to use a custom domain on Github Pages

How to set up DNS records on gandi.net to use a custom domain on Github Pages

You would think it would be easy to find this information, but none of the Github or Gandi documentation is clear so I have recorded the required steps here.

Create the following A records:

@ 1800 IN A 185.199.108.153
@ 1800 IN A 185.199.109.153
@ 1800 IN A 185.199.110.153
@kigster
kigster / reduce-underscan.sh
Last active June 19, 2024 03:07
This shell script walks you through the steps required to change the monitor underscan or overscan value on OS-X, when the Display Preferences are not providing the underscan/overscan slider for a given display. This process was documented by Ishan Sharma here: http://ishan.co/external-monitor-underscan and is a part of BashMatic library.
#!/usr/bin/env bash
#
# Script to change underscan/overscan value of a monitor on OS-X.
# © 2016-2019 Konstantin Gredeskoul, distributed under the MIT License.
#
#———————————————————————————————————————————————————————————————————————————————————————————
# EXCEPT AS REPRESENTED IN THIS AGREEMENT, ALL WORK PRODUCT BY DEVELOPER IS PROVIDED "AS IS".
# OTHER THAN AS PROVIDED IN THIS AGREEMENT, DEVELOPER MAKES NO OTHER WARRANTIES, EXPRESS OR
# IMPLIED, AND HEREBY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING ANY WARRANTY OF
# MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
@mrTimofey
mrTimofey / fastcgi-php.conf
Created March 9, 2018 04:36
PHP 7.2, php-fpm, nginx, A+ ssl, http2 config
index index.php index.html index.htm;
# process all non-existent files with /index.php
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
# php processing config
location ~ \.php$ {
try_files $uri /index.php =404;
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active March 5, 2025 14:02
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.