Skip to content

Instantly share code, notes, and snippets.

View Obbut's full-sized avatar

Robbert Brandsma Obbut

  • Veldhoven, NL
  • 21:25 (UTC +02:00)
View GitHub Profile
@dees040
dees040 / deploy_site
Last active August 22, 2023 19:47
Deploy a Vue.JS app on Laravel Forge with zero downtime
#!/bin/bash
set -e
SITE=$1
HOME="/home/forge"
DESTINATION="$HOME/$SITE"
TARGET="$HOME/deployments/$SITE/current"
function display_usage() {
@Joannis
Joannis / VaporLeopardBridge.swift
Created August 11, 2017 14:16
Requires Leopard beta 1 and Vapor 2
import Vapor
import Leopard
import Lynx
import Sockets
import HTTP
public final class LynxServer : ServerProtocol, AsyncRouter {
public func register(at path: [String], method: Lynx.Method?, isFallbackHandler: Bool, handler: @escaping RequestHandler) {
router.register(at: path, method: method, isFallbackHandler: isFallbackHandler, handler: handler)
}
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 19, 2024 07:58
Swift Concurrency Manifesto
@steipete
steipete / ios-xcode-device-support.sh
Last active December 12, 2023 03:36
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@bmhatfield
bmhatfield / .profile
Last active May 6, 2024 22:27
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else