- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory
| [db makeFunctionNamed:@"UTTypeConformsTo" maximumArguments:2 withBlock:^(sqlite3_context *context, int argc, sqlite3_value **argv) { | |
| if (sqlite3_value_type(argv[0]) == SQLITE_TEXT) { | |
| const unsigned char *a = sqlite3_value_text(argv[0]); | |
| const unsigned char *b = sqlite3_value_text(argv[1]); | |
| CFStringRef as = CFStringCreateWithCString(0x00, (const char*)a, kCFStringEncodingUTF8); | |
| CFStringRef bs = CFStringCreateWithCString(0x00, (const char*)b, kCFStringEncodingUTF8); | |
| sqlite3_result_int(context, UTTypeConformsTo(as, bs)); |
| from Crypto import HMAC, SHA256 | |
| def hmac_sha256(key, msg): | |
| hash_obj = HMAC.new(key=key, msg=msg, digestmod=SHA256) | |
| return hash_obj.hexdigest() |
Changes:
-
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
-
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.
| // Pass Xcode build-time CONFIGURATION variable to runtime as an Objective-C string | |
| #define QUOTE(name) #name | |
| #define STR(macro) QUOTE(macro) | |
| #define CONFIG_NAME_CSTR STR(CONFIGURATION) | |
| #define CONFIG_NAME [NSString stringWithCString:CONFIG_NAME_CSTR encoding:NSUTF8StringEncoding] |
The reason why you might get certificate errors in Ruby 2.0 when talking HTTPS is because there isn't a default certificate bundle that OpenSSL (which was used when building Ruby) trusts.
Update: this problem is solved in edge versions of rbenv and RVM.
$ ruby -rnet/https -e "Net::HTTP.get URI('https://github.com')"
net/http.rb:917:in `connect': SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
You can work around the issue by installing a certificate bundle that you trust. I trust Mozilla and curl.
| void *UIKit = dlopen([[[NSBundle bundleForClass:[UIApplication class]] executablePath] fileSystemRepresentation], RTLD_LAZY); | |
| CGFloat (*UIAnimationDragCoefficient)(void) = (CGFloat (*) (void)) dlsym(UIKit, "UIAnimationDragCoefficient"); | |
| DLog(@"coefficient is %f", UIAnimationDragCoefficient ? UIAnimationDragCoefficient() : 1.f); |
| /* | |
| * Copyright (C) 2013 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| // When the `accessibility inspector' is enabled on the iOS Simulator the private `UIAccessibility' | |
| // framework is loaded. In turn it will try to load a list of bundles amongst which is one that has | |
| // only resources, no executable. This leads to `CFBundleLoadExecutableAndReturnError' logging this | |
| // offending error message. | |
| // | |
| // This code omits the `SDK_ROOT/System/Library/AccessibilityBundles/CertUIFramework.axbundle' | |
| // bundle from ever being attempted to load. | |
| // | |
| // This code is available under the MIT license: http://opensource.org/licenses/MIT | |
| // |