Skip to content

Instantly share code, notes, and snippets.

View themsaid's full-sized avatar
🚴‍♂️
Just paddling

Mohamed Said themsaid

🚴‍♂️
Just paddling
View GitHub Profile
@themsaid
themsaid / scripts.bash
Last active December 1, 2020 19:09
My .zshrc
alias art="php artisan"
alias dracarys="git reset --hard && git clean -df"
alias phpfix="php php-cs-fixer.phar fix"
alias weather='curl -s wttr.in/Hurghada | sed -n "2,7p"'
alias usd='curl -s "https://www.google.com/finance/converter?a=1&from=USD&to=EGP" | LC_CTYPE=C sed "/res/!d;s/<[^>]*>//g"'
alias shrug="echo '¯\_(ツ)_/¯' | pbcopy";
alias fight="echo '(ง'̀-'́)ง' | pbcopy";
alias happy="echo 'ᕕ( ᐛ )ᕗ' | pbcopy";
# Commit all the current changes with a message
@themsaid
themsaid / controller.md
Created March 23, 2020 09:49
OG post images

require "stil/gd-text": "^1.1",

class ControllerClass extends Controller
{
    public function __invoke($slug)
    {
        $post = WinkPost::where('slug', $slug)->first();
        $quickDip = $post->tags()->whereSlug('quick-dip')->first() ;
@themsaid
themsaid / AppServiceProvider.php
Created January 26, 2020 16:24
Re-encryption after APP_KEY rotation
<?php
namespace App\Providers;
use App\Encrypter;
use Illuminate\Support\Str;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{