Skip to content

Instantly share code, notes, and snippets.

View gtranchedone's full-sized avatar

Gianluca Tranchedone gtranchedone

View GitHub Profile
@gtranchedone
gtranchedone / VaporRoutes.swift
Created November 26, 2016 15:22
Vapor Routes Command Helper
import Console
import Routing
import HTTP
class FakeRouter: RouteBuilder {
public typealias Host = String
public typealias Method = String
public typealias Output = HTTP.Responder
private let console: Terminal
@gtranchedone
gtranchedone / xcode_tags_highlight.sh
Created November 7, 2016 13:01
Script to highlight comments marking TODOs, FIXMEs, WARNINGs and ERRORs in Xcode
TAGS="\/\/.*TODO:|\/\/.*FIXME:|\/\/.*WARNING:|\/\/.*ERROR:"
TARGET_FOLDER="${SRCROOT}"
echo "searching ${TARGET_FOLDER} for ${TAGS}"
find -E "${TARGET_FOLDER}" -regex ".*\.(swift|m|h)" ! -path "${PODS_ROOT}/**/*" -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"