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/sh -e | |
find . -name .git -type d | while read dir; do repo=$(dirname $dir); echo $repo; git -C $repo status --short --branch; echo ""; done |
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
gci -r -fo -fi .git |% { $g = $_.Fullname; $r = $g.Substring(0,$g.Length-5); Write-Host($r); git -C $r status --porcelain --branch } |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>exe</OutputType> | |
<TargetFramework>netcoreapp1.0</TargetFramework> | |
<RuntimeIdentifiers>win7-x86;win10-x64</RuntimeIdentifiers> | |
</PropertyGroup> | |
<ItemGroup> | |
<None Remove="TextFile1.txt" /> |
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
extension NSURLSession { | |
enum UTF8Encoding : ErrorType { case Error } | |
enum JsonDecoding : ErrorType { case Error } | |
func dataForRequest(request:NSURLRequest, completeWith: (dataResult: () throws -> NSData) -> Void) { | |
let task = self.dataTaskWithRequest(request) { (data:NSData?, response:NSURLResponse?, error:NSError?) in | |
guard let data = data else { |
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 System.Collections.Generic; | |
using log4net; | |
namespace Infrastructure | |
{ | |
public interface IInterceptLogs | |
{ | |
IList<string> Lines { get; } | |
IList<Exception> Exceptions { get; } |
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 System.Collections.Generic; | |
namespace HashSetTest | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
var curSet = new[] {"A","B","C","D","E"}; |
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
import Foundation | |
func deserializeWCFDateString(json:AnyObject?) -> NSDate? { | |
if let jsonDateString = json as? String { | |
if countElements(jsonDateString) < 18 { | |
return 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
// | |
// Loads the DefaultValue for each preference specifier with a Key in your Settings.bundle, | |
// | |
// For example, if your Settings.bundle has the following entry: | |
// | |
// <dict> | |
// <key>Type</key> | |
// <string>PSMultiValueSpecifier</string> | |
// <key>Title</key> | |
// <string>Frequency</string> |
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 System.Diagnostics; | |
using System.IO; | |
using System.Text; | |
using Nancy; | |
using Nancy.Hosting.Self; | |
using Nancy.Testing; | |
using Nancy.ViewEngines; | |
namespace NancyTesting |
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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
Account* account = [_accounts objectAtIndex:[indexPath row]]; | |
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:"AccountViewCell"]; | |
[[cell textLabel] setText:account.name]; | |
[[cell detailTextLabel] setText:account.email]; | |
return cell; | |
} |