Skip to content

Instantly share code, notes, and snippets.

View skunkworker's full-sized avatar

John Bolliger skunkworker

View GitHub Profile
View UIHostingController-Keyboard.swift
extension UIHostingController {
convenience public init(rootView: Content, ignoreSafeArea: Bool) {
self.init(rootView: rootView)
if ignoreSafeArea {
func disableSafeArea() {
mobilinked / gist:9b6086b3760bcf1e5432932dad0813c0
Last active February 9, 2024 13:03
SwiftUI - prevent auto dismiss the sheet by drag down
View gist:9b6086b3760bcf1e5432932dad0813c0
// Created by on 2020/11/8.
import SwiftUI
/// Control if allow to dismiss the sheet by the user actions
/// - Drag down on the sheet on iPhone and iPad
/// - Tap outside the sheet on iPad
/// No impact to dismiss programatically (by calling "presentationMode.wrappedValue.dismiss()")
nadavrot /
Last active February 14, 2024 20:00
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).


Matrix multiplication is a mathematical operation that defines the product of

giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active April 20, 2023 10:03
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
View gist:ebaca117ac9e44231421f04e7796d5ca
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
ipepe /
Last active February 20, 2024 17:32
Installing headless chrome on Ubuntu.
# from
# and
# and
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser
chromium-browser --headless --no-sandbox
joduplessis / cookie-typescript-utils.ts
Created September 12, 2017 06:50
Setting, deleting and retrieving cookies in Typescript.
View cookie-typescript-utils.ts
pablopaul / deploy.rb
Last active February 5, 2019 19:19 — forked from cannikin/deploy.rb
Notify Sentry of a new release via Capistrano with Auth Token
View deploy.rb
# This task will notify Sentry via their API[1] that you have deployed
# a new release. It uses the release timestamp as the `version`
# (like 20151113182847) and the git ref as the optional `ref` value.
# This task requires several environment variables be set (or just
# hardcode the values in here if you like living on the edge):
# ENV['SENTRY_ORG'] : the organization for this app
# ENV['SENTRY_PROJECT'] : the project for this app
webframp /
Created July 25, 2017 18:14
Signing git commits on github using gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

ziadoz /
Last active May 25, 2023 00:13
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# Versions
mubix /
Last active February 7, 2024 20:20
How to start in Infosec