Skip to content

Instantly share code, notes, and snippets.

@ForestJay
ForestJay / git_cleanup
Last active February 28, 2024 03:21 — forked from kevinwright/git_cleanup
#!/bin/bash
# WARNING
# This expects your repository to be in ~/git . If your repository is elsewhere you will need to alter the script.
# SYNOPSIS
# git_cleanup [repo name] [-xl]
# DESCRIPTION
# This script allows people to delete (-x) the history of a directory OR destroy (-l) the history of a directory and just
@armstrongnate
armstrongnate / basic-auth.swift
Created July 20, 2014 21:45
HTTP Basic Authentication using NSURLSession in swift
import Foundation
let config = NSURLSessionConfiguration.defaultSessionConfiguration()
let userPasswordString = "[email protected]:password"
let userPasswordData = userPasswordString.dataUsingEncoding(NSUTF8StringEncoding)
let base64EncodedCredential = userPasswordData!.base64EncodedStringWithOptions(nil)
let authString = "Basic \(base64EncodedCredential)"
config.HTTPAdditionalHeaders = ["Authorization" : authString]
let session = NSURLSession(configuration: config)
ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR