Skip to content

Instantly share code, notes, and snippets.

View byaruhaf's full-sized avatar
🏄
Surfing Xcode

Franklin Byaruhanga byaruhaf

🏄
Surfing Xcode
View GitHub Profile
### Keybase proof
I hereby claim:
* I am byaruhaf on github.
* I am byaruhaf (https://keybase.io/byaruhaf) on keybase.
* I have a public key whose fingerprint is 185A D63F E287 34A4 2351 5948 7E4A 9CB8 F865 BC7B
To claim this, I am signing this object:
@byaruhaf
byaruhaf / pre-commit
Created April 6, 2018 13:39 — forked from candostdagdeviren/pre-commit
Git Pre-Commit hook with SwiftLInt
#!/bin/bash
#Path to swiftlint
SWIFT_LINT=/usr/local/bin/swiftlint
#if $SWIFT_LINT >/dev/null 2>&1; then
if [[ -e "${SWIFT_LINT}" ]]; then
count=0
for file_path in $(git ls-files -m --exclude-from=.gitignore | grep ".swift$"); do
export SCRIPT_INPUT_FILE_$count=$file_path
☻ brew list
ack freetype libgpg-error openssl tailor
antigen frei0r libidn2 openssl@1.1 tesseract
aom fribidi libogg opus the_platinum_searcher
applesimutils fzf libplist p11-kit the_silver_searcher
autoconf gawk libpng pcre theora
automake gd libpq pcre2 things.sh
bartycrouch gdbm libressl perl tig
bison geoip libsamplerate pixman tmux
bluepill gettext libsndfile pkg-config torsocks
@byaruhaf
byaruhaf / README-Template.md
Created May 13, 2018 11:29 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@byaruhaf
byaruhaf / Breakpoints_v2.xcbkptlist
Created August 14, 2018 07:33
User Breakpoints for XCODE goes into: ~/Library/Developer/Xcode/UserData/xcdebugger
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
function prompt_wikimatze_precmd {
git-info
}
function prompt_wikimatze_setup {
setopt LOCAL_OPTIONS
unsetopt XTRACE KSH_ARRAYS
prompt_opts=(cr percent subst)
# Load required functions.
@byaruhaf
byaruhaf / Contract Killer 3.md
Created October 20, 2019 18:51
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@byaruhaf
byaruhaf / HTTPStatusCode.swift
Created October 21, 2019 15:15 — forked from ollieatkinson/HTTPStatusCode.swift
HTTP status codes as a Swift enum.
/// This is a list of Hypertext Transfer Protocol (HTTP) response status codes.
/// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes.
/// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum.
enum HTTPStatusCode: Int, Error {
/// The response class representation of status codes, these get grouped by their first digit.
enum ResponseType {
/// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.
case informational
@byaruhaf
byaruhaf / swiftLintInUseArticle_swintLint.yml
Created November 19, 2019 21:58 — forked from novinfard/swiftLintInUseArticle_swintLint.yml
[SwiftLint in Use article - SwiftLint configuration file with all configurable rules]
disabled_rules: # rule identifiers to exclude from running
- colon
- comma
- control_statement
opt_in_rules: # some rules are only opt-in
- empty_count
# Find all the available rules by running:
# swiftlint rules
included: # paths to include during linting. `--path` is ignored if present.
- Source
@byaruhaf
byaruhaf / AudioLoader.swift
Created December 21, 2019 08:57 — forked from marcosgriselli/AudioLoader.swift
Play an audio file from resources or .xcassets
import AVFoundation
var audioPlayer: AVAudioPlayer?
enum AudioLoader {
case fromResource(URL)
case fromAsset(NSDataAsset)
}
enum AudioLoaderError: Error {
case resourceNotFound