This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Mono.Unix; | |
using Mono.Unix.Native; | |
using System.Configuration; | |
using ServiceStack; | |
using ServiceStack.Web; | |
using System.IO; | |
using ServiceStack.Host.HttpListener; | |
using System.Net; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Vacuum < Formula | |
homepage "http://github.com/jlyonsmith/Vacuum" | |
url "https://s3-us-west-2.amazonaws.com/jlyonsmith/Vacuum-3.0.20307.tar.gz" | |
sha1 "e24bc5621753fbee9166e4dc2bf5dcc9ee426016" | |
def install | |
mono_path = `/usr/bin/which mono`.strip | |
if mono_path.size == 0 || `#{mono_path} --version`.index(/3\./) == nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Soapbox < Formula | |
homepage "http://github.com/jlyonsmith/Soapbox" | |
url "https://s3-us-west-2.amazonaws.com/jlyonsmith/Soapbox-1.0.20302.tar.gz" | |
sha1 "b146ce78122a19ec104e9bf6be73fd0c1ef9acd4" | |
def install | |
mono_path = `/usr/bin/which mono`.strip | |
if mono_path.size == 0 || `#{mono_path} --version`.index(/3\./) == nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Codetools < Formula | |
homepage "http://jlyonsmith.github.io/CodeTools/" | |
url "https://s3-us-west-2.amazonaws.com/jlyonsmith/CodeTools-3.0.10708.tar.gz" | |
sha1 "32e70ffdd931fa6b3928d50b04d3e567ec37f471" | |
def install | |
mono_path = `/usr/bin/which mono`.strip | |
if mono_path.size == 0 || `#{mono_path} --version`.index(/3\./) == nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public func Log<T>(item: T, fileName: String = __FILE__, line: Int = __LINE__, funcName:String = __FUNCTION__) { | |
let dateFormatter = NSDateFormatter() | |
dateFormatter.dateFormat = "MM/dd/yyyy HH:mm:ss:SSS" | |
let process = NSProcessInfo.processInfo() | |
let threadId = "?" | |
var shortFileName = (NSURL(string: fileName)?.lastPathComponent?.componentsSeparatedByString(".").first) | |
if shortFileName == nil { | |
shortFileName = "unknown" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | ruby -e 'ARGF.each { |line| a = line.match(/(?:[^\/]*)\/(.*)/).captures; puts a }' | xargs git push origin --delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Print the SSH MD5 fingerprint (works on OSX El Capitan which defaults to a SHA256 fingerprint) | |
ssh-keygen -E md5 -lf ~/.ssh/id_rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Convert a .p12 format file to a .pem format | |
openssl pkcs12 -in $1 -out $2 -nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME=$1 | |
EMAIL=$2 | |
if [[ "$USERNAME" == "" || "$EMAIL" == "" ]]; then | |
echo 'Usage: create-user USERNAME EMAIL' | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let alert = UIAlertController(title: "Title", message: "Message", preferredStyle: .alert) | |
alert.addAction(UIAlertAction(title: "Save", style: .default, handler: { (action: UIAlertAction!) in | |
debugPrint("Saved") | |
})) | |
alert.addAction(UIAlertAction(title: "Cancel", style: .default, handler: { (action: UIAlertAction!) in | |
debugPrint("Cancel") | |
})) | |
present(alert, animated: true, completion: nil) |