This file contains hidden or 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
#pragma description End of Central Directory Header, Central Directory File Headers | |
#pragma MIME application/zip | |
#include <std/mem.pat> | |
#include <std/math.pat> | |
struct EndOfCentralDirectory { | |
u32 headerSignature [[color("00000000")]]; | |
u16 diskNum [[comment("Number of this disk "), name("Disk Number")]]; |
This file contains hidden or 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 Windows.Security.Credentials; | |
using WinRT; | |
namespace CredentialCsWinRtTest { | |
internal class Program { | |
static void Main(string[] args) { | |
Windows.Security.Credentials.WebAccount foo = null /* or somehow get it */; | |
Windows.Security.Credentials.IWebAccount2 webAccount2 = foo.As<IWebAccount2>(); | |
// if webaccount2 is not null . . . | |
webAccount2.SignOutAsync("clientId"); // do something with the async task actually |
This file contains hidden or 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
2016-06-05 14:30:07,345 [DEBUG] - Configured chocolatey.infrastructure.logging.log4net.config.xml from assembly choco, Version=0.9.10.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb | |
2016-06-05 14:30:07,345 [DEBUG] - Configured chocolatey.infrastructure.logging.log4net.config.xml from assembly choco, Version=0.9.10.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb | |
2016-06-05 14:30:07,364 [DEBUG] - XmlConfiguration is now operational | |
2016-06-05 14:30:07,508 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\config\chocolatey.config.update". | |
2016-06-05 14:30:07,513 [INFO ] - ============================================================ | |
2016-06-05 14:30:07,519 [INFO ] - Chocolatey v0.9.10-beta1-281-gfd2eea1 | |
2016-06-05 14:30:07,529 [DEBUG] - Chocolatey is running on Windows v 10.0.14355.0 | |
2016-06-05 14:30:07,532 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old". | |
2016-06-05 14:30:07,534 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old". | |
2016-0 |
This file contains hidden or 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
#include <unicode/utf8.h> | |
// This only covers two of the common Emoji ranges, but the Emoji character set is broken | |
// up across seven different regions. | |
@implementation NSString (StripEmoji) | |
- (NSString *)stringByRemovingEmoji { | |
NSData *d = [self dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO]; | |
if(!d) return nil; | |
const char *buf = d.bytes; | |
unsigned int len = [d length]; | |
char *s = (char *)malloc(len); |
This file contains hidden or 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
@interface MyAwesomeSingletonPleaseDontNameMeThis: NSObject | |
+ (id)sharedInstance; | |
- (void)registerForNotifications; | |
@end | |
@implementation MyAwesomeSingletonPleaseDontNameMeThis | |
+ (id)sharedInstance { | |
static id _sh; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ |
This file contains hidden or 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
function _uh { [[ -z $DEV ]]; return $? } | |
function userroot { | |
if ! _uh; then echo $DEV; | |
else echo $HOME; fi | |
} | |
function _sdirname { | |
echo "$(userroot)/.sdirs" | |
} |
This file contains hidden or 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 | |
SDK=`dirname $0` | |
SCRIPT=`basename $0` | |
SDKPARENT=`dirname $SDK` | |
PLATFORM=`uname -sp` | |
if [ "$PLATFORM" = "Darwin i386" -o "$PLATFORM" = "Darwin x86_64" ]; then | |
echo "iPhone Toolchain installer script by rpetrich" | |
echo "" |