This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
return new class extends Migration | |
{ | |
/** | |
* Run the migrations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Route; | |
// Usage: | |
// | |
// Route::domain('domain.com', function () { | |
// Route::get('/', [DomainController::class, 'index']); | |
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update run_command in app spec to pass config, e.g. `run_command: heroku-php-apache2 -C apache_app.conf public/` | |
DirectoryIndex index.php index.html index.htm | |
# mod_remoteip should be loaded by default, but needs configuration | |
RemoteIPHeader DO-Connecting-IP | |
# Trust any private IPv4 ranges | |
RemoteIPTrustedProxy 10.0.0.0/8 | |
RemoteIPTrustedProxy 172.16.0.0/12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT_SSH_COMMAND="ssh -i ~/.ssh/PRIVATE_KEY" git clone [email protected]:ORG/REPO.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
access_log syslog:server=unix:/dev/log,tag=nginx,nohostname,severity=info combined; | |
error_log syslog:server=unix:/dev/log,tag=nginx,nohostname,severity=error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toBlueprint(obj) { | |
if (!obj || typeof obj !== 'object') { | |
return obj; | |
} | |
if(Array.isArray(obj)) { | |
return obj.map(toBlueprint) // nit: won't unify common props | |
} | |
return Object.keys(obj).reduce((acc, key) => { | |
let blueprint = typeof obj[key]; | |
if (blueprint === "object" && blueprint) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias fix_trackpad="sudo modprobe -r elan_i2c && sudo modprobe elan_i2c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DependencyList, EffectCallback, useEffect, useRef } from 'react'; | |
const useEffectDebug = ( | |
effect: EffectCallback, | |
deps: DependencyList, | |
label?: string, | |
) => { | |
const previous = useRef<DependencyList>(); | |
useEffect(() => { | |
const changedDepIndexes: number[] = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>~alun</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 2vh 5vh 4vh; | |
background: #050505; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install nvm && echo -e "\ | |
NVM_DIR=\"$HOME/.nvm\"\n. \"/usr/local/opt/nvm/nvm.sh\" | |
" >> ~/.bash_profile && source ~/.bash_profile && | |
nvm install v8 --default && | |
brew cask install iterm2 chromium visual-studio-code 1password authy alfred | |
sudo rm -rf Downloads/ | |
ln -s ~/Desktop Downloads |
NewerOlder