Skip to content

Instantly share code, notes, and snippets.

View skerkewitz's full-sized avatar
💭
Working!

Stefan Kerkewitz skerkewitz

💭
Working!
  • Cologne, Germany
  • 22:07 (UTC +02:00)
  • Instagram skerkewitz
View GitHub Profile
@skerkewitz
skerkewitz / advent_of_code_day20.rs
Created December 20, 2020 21:31
Advent of Code 2020 Day 20 Part 1 and 2 in Rust
use std::{f32};
use std::collections::HashSet;
use std::fmt::{Debug, Display};
use std::fs::File;
use std::io::{BufRead, BufReader};
use lazy_static::lazy_static;
use regex::Regex;
mod test;
@skerkewitz
skerkewitz / gist:af6c8e39ca63f41dd30d8145710bf770
Created June 14, 2018 12:17
Remove all files which are on ignore list but still tracked by git.
git ls-files --ignored --exclude-standard -z | xargs -0 git rm --cached
git commit -am "Remove ignored files"
@skerkewitz
skerkewitz / .swift
Created June 9, 2017 13:25
Poor man's profiling in Swift.
let methodStart = Date()
// do some stuff
let methodFinish = Date()
let executionTime = methodFinish.timeIntervalSince(methodStart)
print("Execution time: \(executionTime)")
@skerkewitz
skerkewitz / LumberjackNSLogger.swift
Created April 19, 2017 14:34
CocoaLumberjack log sink to NSLogger.
/**
Just add Coccoa Lumberjack and NSLogger to your podfile:
pod 'CocoaLumberjack/Swift', '~> 3.1.0'
pod 'NSLogger', '~> 1.8.1'
And add the sink to your CoccoaLumberjack logging chain:
let xcdLumberjackNSLogger = LumberjackNSLogger(bonjourServiceName: serviceName)
DDLog.add(xcdLumberjackNSLogger)
@skerkewitz
skerkewitz / gist:374bd819e6d5a0ead371bf7a83d492e6
Created March 30, 2017 09:06 — forked from steipete/ios-xcode-device-support.sh
Using iOS 10.3 devices with Xcode 8.2.1
// The trick is to link the DeviceSupport folder from the beta to the stable version.
// Updated on Jan 24th, 2017 for Xcode 8.3b1
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.3\ \(14E5230d\)/ /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
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
@skerkewitz
skerkewitz / gist:4173aed99e184fb04d04219ab05ba7ad
Created April 12, 2016 10:30
Remove all version of cocopods and all sub modules
# Remove all version of cocopods and all sub modules
gem list --local --no-version | grep cocoapods | xargs sudo gem uninstall -aIx