Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexis (Aubry) Akers alexisakers

View GitHub Profile
@alexisakers
alexisakers / fix.sh
Created Oct 26, 2020
Fix Mac video and audio/mic issues during meetings
View fix.sh
#!/bin/zsh
FEATURE=$1
case $FEATURE in
video)
echo "Restarting camera software"
sudo killall VDCAssistant; sudo killall AppleCameraAssistant
;;
audio)
echo "Restarting audio software"
View byte-2020-08-20-haptics.swift
// Author: Alexis Akers
// License:
// This code is published under the public domain. The software is provided "as is" without warranty
// of any kind and I cannot be held liable for any issue arising from its usage.
/// An object that performs haptic feedback.
struct Haptics {
/// Performs a success haptic feedback.
func success() {
let feedbackGenerator = UINotificationFeedbackGenerator()
@alexisakers
alexisakers / BLTNWebPageItem.swift
Last active Dec 17, 2018
Example BLTNItem for displaying a web view
View BLTNWebPageItem.swift
import BLTNBoard
import WebKit
class BLTNWebPageItem: FeedbackPageBLTNItem {
let url: URL
init(url: URL) {
self.url = url
super.init(title: "Web Page")
@alexisakers
alexisakers / update_carthage_dependencies.swift
Created Sep 5, 2018
Swift Script to update Carthage dependencies
View update_carthage_dependencies.swift
//
// update_carthage_dependencies
// Copyright (C) 2018 Alexis Aubry
//
// --------------------------------------------------------------------
// This script updates your Licenses plist file with the
// latest licenses and dependencies from Carthage.
//
// In Xcode, add this script as a build phase, before the "Copy Bundle
// Resources" phase in the main target.
@alexisakers
alexisakers / osstatus.swift
Last active Nov 16, 2017
Get the description of a Security OSStatus
View osstatus.swift
#!/usr/bin/swift
import Foundation
import Security
guard CommandLine.arguments.count > 1 else {
print("USAGE: osstatus [code]")
exit(-1)
}
@alexisakers
alexisakers / IndexedSum.swift
Last active Dec 26, 2016
Indexed Summations in Swift (∑)
View IndexedSum.swift
/*
* ==---------------------------------------------------------------------------------==
*
* File : IndexedSum.swift
* Author : ALEXIS AUBRY RADANOVIC
*
* License : The MIT License (MIT)
*
* ==---------------------------------------------------------------------------------==
*
@alexisakers
alexisakers / CFArray+Sequence.swift
Created Dec 22, 2016
Extension on the CFArray type to make it conform to Sequence
View CFArray+Sequence.swift
/*
* CFArray+Sequence.swift
* Alexis Aubry Radanovic
*/
import Foundation
import CoreFoundation
extension CFArray: Sequence {
@alexisakers
alexisakers / Heroku-Vapor-Docker-Tutorial.md
Last active Oct 19, 2022
How to run Vapor with Docker in Heroku
View Heroku-Vapor-Docker-Tutorial.md

How to run Vapor with Docker in Heroku

In this tutorial you'll learn how to run a Vapor server in a Docker container on Heroku.

Recently, Heroku added the ability to run Docker images on their Runtime. You can use this system instead of the traditional buildpack-based system for various reasons, mainly for having more control over the environment your server will run on.

Prerequisites

To complete this tutorial, you'll need:

@alexisakers
alexisakers / Array+Suffix.swift
Created Nov 17, 2016
Remove trailing elements in a Swift array
View Array+Suffix.swift
/*
* ==---------------------------------------------------------------------------------==
*
* File : Array+Suffix.swift
* Project : Array+Suffix
* Author : ALEXIS AUBRY RADANOVIC
*
* License : The MIT License (MIT)
*
* ==---------------------------------------------------------------------------------==
@alexisakers
alexisakers / ConcurrentOperation.swift
Last active Jul 18, 2017 — forked from calebd/AsynchronousOperation.swift
Concurrent Operation in Swift 3
View ConcurrentOperation.swift
//
// ConcurrentOperation.swift
//
// Created by Caleb Davenport on 7/7/14.
//
// Learn more at http://blog.calebd.me/swift-concurrent-operations
//
import Foundation