Skip to content

Instantly share code, notes, and snippets.

@apetresc
apetresc / error.txt
Created December 29, 2012 21:50
MacRuby error with updated bridgesupport
dyld: Library not loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
Referenced from: /Users/apetresc/Library/Developer/Xcode/DerivedData/MacGo-blrxntrnbebijlcuexghzzydomgm/Build/Products/Debug/MacGo.app/Contents/MacOS/MacGo
Reason: Incompatible library version: MacGo requires version 64.0.0 or later, but ApplicationServices provides version 1.0.0
<?xml version='1.0'?>
<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
<signatures version='1.0'>
<depends_on path='/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework'/>
<depends_on path='/System/Library/Frameworks/CoreText.framework'/>
<depends_on path='/System/Library/Frameworks/ImageIO.framework'/>
<depends_on path='/System/Library/Frameworks/CoreServices.framework'/>
<depends_on path='/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework'/>
<depends_on path='/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework'/>
<depends_on path='/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework'/>
<?xml version='1.0'?>
<!DOCTYPE signatures SYSTEM "file://localhost/System/Library/DTDs/BridgeSupport.dtd">
<signatures version='1.0'>
<depends_on path='/System/Library/Frameworks/IOKit.framework'/>
<depends_on path='/System/Library/Frameworks/IOSurface.framework'/>
<depends_on path='/System/Library/Frameworks/CoreServices.framework'/>
<depends_on path='/System/Library/Frameworks/CoreFoundation.framework'/>
<depends_on path='/System/Library/Frameworks/Security.framework'/>
<struct type64='{CGAffineTransform=&quot;a&quot;d&quot;b&quot;d&quot;c&quot;d&quot;d&quot;d&quot;tx&quot;d&quot;ty&quot;d}' name='CGAffineTransform' type='{CGAffineTransform=&quot;a&quot;f&quot;b&quot;f&quot;c&quot;f&quot;d&quot;f&quot;tx&quot;f&quot;ty&quot;f}'/>
<struct name='CGDataConsumerCallbacks' type='{CGDataConsumerCallbacks=&quot;putBytes&quot;^?&quot;releaseConsumer&quot;^?}'/>
:"United States","population":2.99846449E8,"iso":"US"}
[INFO ] 2013-03-10 14:41:47,035 : For gps: {"longitude":-77.0364,"latitude":38.8951,"radius":45.0} got country: {"name":"United States","population":2.99846449E8,"iso":"US"}
[INFO ] 2013-03-10 14:41:47,116 : For gps: {"longitude":-93.6091,"latitude":41.6005,"radius":45.0} got country: {"name":"United States","population":2.99846449E8,"iso":"US"}
[INFO ] 2013-03-10 14:41:47,394 : Handling requestId: 3c3f3aa1-e733-455d-b800-3bfde5d408bc with gps: {"longitude":58.5933,"latitude":23.6133,"radius":45.0}
[INFO ] 2013-03-10 14:41:47,473 : For gps: {"longitude":58.5933,"latitude":23.6133,"radius":45.0} got country: {"name":"Oman","population":2507042.0,"iso":"OM"}
[INFO ] 2013-03-10 14:41:47,687 : Handling requestId: f78fd139-fe35-49e0-a21d-ca18ceb8a588 with gps: {"longitude":-122.0139997,"latitude":36.996421,"radius":30.0}
[INFO ] 2013-03-10 14:41:47,847 : For gps: {"longitude":-122.0139997,"latitude":36.996421,"radius":30.0} got country: {"name":"United States"
Tue Mar 19 19:05:01 [initandlisten] MongoDB starting : pid=6654 port=27017 dbpath=/mnt/mongo/data/s-ds037187-c/ 64-bit host=ip-10-124-81-242
Tue Mar 19 19:05:01 [initandlisten] db version v2.2.3, pdfile version 4.5
Tue Mar 19 19:05:01 [initandlisten] git version: f570771a5d8a3846eb7586eaffcf4c2f4a96bf08
Tue Mar 19 19:05:01 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Tue Mar 19 19:05:01 [initandlisten] options: { dbpath: "/mnt/mongo/data/s-ds037187-c/" }
Tue Mar 19 19:05:01 [initandlisten] journal dir=/mnt/mongo/data/s-ds037187-c/journal
Tue Mar 19 19:05:01 [initandlisten] recover : no journal files present, no recovery needed
Tue Mar 19 19:05:01 [websvr] admin web console waiting for connections on port 28017
Tue Mar 19 19:05:01 [initandlisten] waiting for connections on port 27017
Tue Mar 19 19:05:21 [initandlisten] connection accepted from 127.0.0.1:53215 #1 (1 connection now open)
@apetresc
apetresc / public-acl.policy
Created March 27, 2013 23:39
S3 Policy for globally-readable bucket
{
"Id": "Policy1364427563049",
"Statement": [
{
"Sid": "Stmt1364427558097",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::*",
# This is the CMakeCache file.
# For build in directory: /tmp/mysql-nSSd/mysql-5.6.13
# It was generated by CMake: /usr/local/Cellar/cmake/2.8.11.2/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
@apetresc
apetresc / grab_org_commits.py
Created August 7, 2013 01:51
Script to grab all commits from an organization since a certain time
from github import Github
import datetime
USER = 'ENTER_USER_HERE'
PASS = 'ENTER_PASS_HERE'
ORG_NAME = 'ENTER_ORG_NAME_HERE'
SINCE = datetime.datetime(2012, 8, 1)
g = Github(USER, PASS)
@apetresc
apetresc / patch.diff
Created September 18, 2013 19:10
Patch for Homebrew's vim to build on OSX 10.9
diff -r a643d80b6507 -r 75f44cf36d49 src/os_unix.c
--- a/src/os_unix.c Sat Aug 10 15:00:24 2013 +0200
+++ b/src/os_unix.c Sun Aug 11 23:09:30 2013 -0400
@@ -827,7 +827,7 @@
|| MAC_OS_X_VERSION_MAX_ALLOWED <= 1040)
/* missing prototype. Adding it to osdef?.h.in doesn't work, because
* "struct sigaltstack" needs to be declared. */
- extern int sigaltstack __ARGS((const struct sigaltstack *ss, struct sigaltstack *oss));
+ extern int sigaltstack __ARGS((const stack_t *restrict ss, stack_t *restrict oss));
# endif
@apetresc
apetresc / IteratorIterator.java
Last active December 26, 2015 08:29
Just your typical interview problem template :)
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/**
* An iterator that flattens an iterator of iterators.
*
* Iterator SQUARED!
*/
public class IteratorIterator<T> implements Iterator<T> {