Skip to content

Instantly share code, notes, and snippets.

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

Peter pl38

πŸ’­
I may be slow to respond.
View GitHub Profile
# Taps
tap 'homebrew/cask'
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
tap 'homebrew/bundle'
tap 'nicoverbruggen/homebrew-cask'
tap 'shivammathur/php'
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
@pl38
pl38 / .zshrc|nvm.bash
Last active May 20, 2020 10:30
.zshrc|nvm to autoload from nvmrc file in project root - ref here: https://github.com/nvm-sh/nvm#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file
# 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
brew install nvm
mkdir ~/.nvm
nvm install node
nvm install 13.8.0 --latest-npm
# or nvm install --lts
nvm use node
nvm run node --version
# we need to execute NVM in every shell session, so let's create two user environment variables NVM_DIR and NVM_HOMEBREW.