Skip to content

Instantly share code, notes, and snippets.

View jkaunert's full-sized avatar

Joshua Kaunert jkaunert

View GitHub Profile

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@jkaunert
jkaunert / iterm2-solarized.md
Created July 18, 2019 03:35 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@jkaunert
jkaunert / github-html-preview-monkey.js
Created August 28, 2019 16:54 — forked from vanyakosmos/github-html-preview-monkey.js
Script for Tampermonkey that adds 'view' to the actions menu beside 'row', 'blame' and 'history' buttons and allow you to preview rendered .html pages.
// ==UserScript==
// @name Github html preview
// @author https://github.com/vaniakosmos
// @version 1.0
// @description Shortcut for htmlpreview.github.io
// @match https://github.com/**/*.html
// @grant none
// @require http://code.jquery.com/jquery-3.2.1.min.js
// ==/UserScript==
@jkaunert
jkaunert / UICollectionView + NSFetchedResultsController.swift
Created August 31, 2019 17:35 — forked from nor0x/UICollectionView + NSFetchedResultsController.swift
UICollectionView + NSFetchedResultsController Swift 3 / iOS 10
var _fetchedResultsController: NSFetchedResultsController<Entity>? = nil
var blockOperations: [BlockOperation] = []
var fetchedResultController: NSFetchedResultsController<Entity> {
if _fetchedResultsController != nil {
return _fetchedResultsController!
}
let fetchRequest: NSFetchRequest<Entity> = Entity.fetchRequest()
let managedObjectContext = (UIApplication.shared.delegate as! AppDelegate).managedObjectContext!
@jkaunert
jkaunert / NSLocale.m
Created October 12, 2019 18:11 — forked from davedelong/NSLocale.m
Locales
/*
======================================================
THIS CODE IS FOR EDUCATIONAL PURPOSES ONLY.
I'M NOT RESPONSIBLE IF YOU SHIP THIS AND IT BLOWS UP IN YOUR FACE.
IF IT DOES AND YOU COMPLAIN TO ME I WILL LAUGH AT YOU.
@jkaunert
jkaunert / gist:edd3ef764833dcfa2cf333a38ca2e5d6
Created January 22, 2020 20:59 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jkaunert
jkaunert / cURL+Request.swift
Created February 2, 2020 17:31 — forked from shaps80/cURL+Request.swift
Generates a cURL command representation of a URLRequest in Swift.
extension URLRequest {
/**
Returns a cURL command representation of this URL request.
*/
public var curlString: String {
guard let url = url else { return "" }
var baseCommand = "curl \(url.absoluteString)"
if httpMethod == "HEAD" {
<!doctype html>
<!-- Bootstrap Under Construction Boilerplate -->
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
@jkaunert
jkaunert / String+HTML.swift
Created March 28, 2020 03:24 — forked from valvoline/String+HTML.swift
A swift string extension to deal with HTML
//
// String+HTML.swift
// AttributedString
//
// Created by Costantino Pistagna on 08/11/2017.
// Copyright © 2017 sofapps.it All rights reserved.
//
import UIKit
import Foundation