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.Text; | |
using System.Xml; | |
using System.Xml.Linq; | |
static string PrettyXml(string xml) | |
{ | |
var stringBuilder = new StringBuilder(); | |
var element = XElement.Parse(xml); |
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
kdj@localhost ~$ brew install -v dotwrp | |
==> Cloning https://github.com/tenomoto/dotwrp.git | |
Updating /Users/kdj/Library/Caches/Homebrew/dotwrp--git | |
git remote set-url origin https://github.com/tenomoto/dotwrp.git | |
git fetch origin | |
git reset --hard origin/HEAD | |
HEAD is now at ea3da3a Updated README for SDOT. | |
git checkout-index -a -f --prefix=/private/tmp/homebrew-dotwrp-1.0-Vivz/ | |
==> Using Homebrew-provided fortran compiler. | |
This may be changed by setting the FC environment variable. |
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
<?xml version="1.0"?> | |
<root> | |
<!-- Kris Johnson's private.xml settings for KeyRemap4MacBook --> | |
<!-- See reference manual at http://pqrs.org/macosx/keyremap4macbook/xml.html --> | |
<item> | |
<name>Private Settings</name> | |
<item> | |
<name>Fn+Backslash(\) to CapsLock</name> | |
<identifier>private.fn_backslash_to_capslock</identifier> |
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 static class Timed | |
{ | |
/// <summary> | |
/// Execute action then invoke reporting action with elapsed time | |
/// </summary> | |
/// <param name="timedAction">action to be executed and elapsed time measured</param> | |
/// <param name="reportAction">action to be executed with the elapsed number of milliseconds passed as a parameter</param> | |
/// <returns>number of milliseconds elapsed during timedAction</returns> | |
public static long Execute(Action timedAction, Action<long> reportAction) | |
{ |
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
- (void)showActivityIndicator:(BOOL)show forTableViewCell:(UITableViewCell *)cell | |
if (show) { | |
cell.accessoryType = UITableViewCellAccessoryNone; | |
UIActivityIndicatorView *activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; | |
[activityIndicatorView startAnimating]; | |
cell.accessoryView = activityIndicatorView; | |
[activityIndicatorView release]; | |
} | |
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
kdj@luna ~$ brew install -v opencv | |
/usr/bin/env python -c import numpy | |
==> Downloading http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.3.1/OpenCV-2.3.1a.tar.bz2 | |
Already downloaded: /Users/kdj/Library/Caches/Homebrew/opencv-2.3.1a.tar.bz2 | |
/usr/bin/tar xf /Users/kdj/Library/Caches/Homebrew/opencv-2.3.1a.tar.bz2 | |
==> Patching | |
/usr/bin/patch -f -p1 -i 000-homebrew.diff | |
patching file modules/highgui/src/grfmt_exr.hpp | |
patching file modules/flann/include/opencv2/flann/any.h | |
patching file modules/flann/include/opencv2/flann/defines.h |
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
kdj@luna ~$ brew --config | |
HOMEBREW_VERSION: 0.9 | |
HEAD: 0beb7abfbc139053351f1858b26065ec6d6c8e55 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: 8-core 64-bit sandybridge | |
OS X: 10.7.3 | |
Kernel Architecture: x86_64 | |
Xcode: 4.3.2 | |
GCC-4.0: N/A |
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
#!/usr/bin/python | |
# | |
# Reads plist from standard input and writes it back to standard output | |
# sorted by key. | |
from plistlib import readPlist, writePlist | |
from sys import stdin, stdout | |
plist = readPlist(stdin) | |
writePlist(plist, stdout) |
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
// Copyright (C) 2012 Kristopher Johnson | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in |
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
+ (NSString *)makeNewUUIDString { | |
CFUUIDRef uuid = CFUUIDCreate(NULL); | |
CFStringRef string = CFUUIDCreateString(NULL, uuid); | |
CFRelease(uuid); | |
return (__bridge_transfer NSString *)(string); | |
} |
OlderNewer