Skip to content

Instantly share code, notes, and snippets.

View pl38's full-sized avatar
πŸ’­
I may be slow to respond.

Peter Lounton pl38

πŸ’­
I may be slow to respond.
View GitHub Profile
{"label":"coverage","message":"94.6%","schemaVersion":1,"color":"hsl(113, 100%, 40%)"}
# Taps
brew tap 'homebrew/cask'
brew tap 'homebrew/cask-fonts'
brew tap 'homebrew/cask-versions'
brew tap 'homebrew/bundle'
brew tap 'nicoverbruggen/homebrew-cask'
brew tap 'shivammathur/php'
brew tap 'shivammathur/extensions'
# Binaries

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
#!/usr/bin/env bash
# Thanks to Mathias Bynens!
# ~/.macos β€” https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
@pl38
pl38 / gist:9c26a72667aa6bd3a3072c8c3b511caa
Created May 23, 2022 13:21 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:

Apache

brew install httpd
brew link httpd
brew services start httpd

The first line installs Apache (traditionally called httpd, short for "http daemon" where "daemon" is how UNIX systems called background server processes). The second line creates symlinks so we can access Apache's executables from the command line. The third line installs and starts a system service which will be launching Apache when we restart our Mac.

Necessary Apache fix

Script to switch PHP versions using Homebrew

Install grep via Homebrew to prefixing with g

 brew install grep
==> Caveats
@pl38
pl38 / CheckRedisCommand.php
Created May 20, 2020 10:27
Laravel command to check Redis is running and if not start - can be used in a cron
<?php
namespace App\Console\Commands;
use Carbon\Carbon;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class CheckRedisCommand extends Command
@pl38
pl38 / CheckHorizonCommand.php
Created May 20, 2020 10:25
Laravel check Horizon is running and if not start - can be call by cron in the kernel
<?php
namespace App\Console\Commands;
use Carbon\Carbon;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class CheckHorizonCommand extends Command
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then