better instructions here: http://pj.freefaculty.org/blog/?p=315
download bzip2 from http://www.bzip.org/
make the shared libraries with:
make -f Makefile-libbz2_so
then need to make a symlink:
ln -s libbz2.so.1.0.6 libbz2.so.1
| #!/bin/bash | |
| #Install build dependencies | |
| sudo dnf groupinstall "Development tools" | |
| sudo dnf install mpfr-devel gmp-devel libmpc-devel zlib-devel glibc-devel.i686 glibc-devel | |
| wget http://mirror2.babylon.network/gcc/releases/gcc-4.7.4/gcc-4.7.4.tar.bz2 | |
| tar xvfj gcc-4.7.4.tar.bz2 | |
| cd gcc-4.7.4 |
| NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"REST URL PATH"]]; | |
| NSData *imageData = UIImageJPEGRepresentation(image, 1.0); | |
| [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; | |
| [request setHTTPShouldHandleCookies:NO]; | |
| [request setTimeoutInterval:60]; | |
| [request setHTTPMethod:@"POST"]; | |
| NSString *boundary = @"unique-consistent-string"; |
better instructions here: http://pj.freefaculty.org/blog/?p=315
download bzip2 from http://www.bzip.org/
make the shared libraries with:
make -f Makefile-libbz2_so
then need to make a symlink:
ln -s libbz2.so.1.0.6 libbz2.so.1
References:
This was tested on El Capitan 10.11.4 (15E65) with python 2.7, which was installed via pyenv.
Download the sdk and client from Oracle. This guide uses 11.2.0.4.0
| #! /usr/bin/env python | |
| ############################################################################### | |
| ## | |
| ## Copyright 2012 Jeet Sukumaran. | |
| ## | |
| ## This program is free software; you can redistribute it and/or modify | |
| ## it under the terms of the GNU General Public License as published by | |
| ## the Free Software Foundation; either version 3 of the License, or | |
| ## (at your option) any later version. |
| import zlib,sys | |
| def deflate( data ): | |
| zlibbed_data = zlib.compress( data ) | |
| #remove byte 0-1(header) and the last four(checksum) | |
| compressed_data = zlibbed_data[2:-4] | |
| return compressed_data | |
| def inflate(compressed_data2): | |
| # -15 for the window buffer will make it ignore headers/footers | |
| zlibbed_data2 = zlib.decompress(compressed_data2, -15) |
| #!/bin/bash | |
| # | |
| # Using the information available in the new iOS8 simulator for each | |
| # device/runtime (device.plist), this script creates a readable folder structure | |
| # (no UDIDs, just simple device/runtime names). Inside that structure it creates | |
| # soft links to your apps in development. | |
| # | |
| # You can run this script every time you install an app to your simulator, or | |
| # you can simply call it to access this folder making sure it will always be | |
| # updated :) |
| class SortedArray { | |
| static boolean ispresent(int[] a, int i) { | |
| return i == find(a, 0, a.length - 1, i); | |
| } | |
| static int find(int[] a, int low, int high, int i) { | |
| int m = low + (high - low) / 2; | |
| if (i == a[m]) |
| #!/bin/bash | |
| # Usage: clusterctl start|stop | |
| # | |
| # Launches a local RabbitMQ cluster | |
| # | |
| # The name returned by `hostname -s` must resolve to 127.0.0.1 | |
| CLUSTER_SIZE=4 | |
| NODENAME_PREFIX='rmq' |
| #!/bin/bash | |
| # | |
| # Put me in cron.daily, cron.hourly or cron.d for your own custom schedule | |
| # Running daily? You'll keep 3 daily backups | |
| # Running hourly? You'll keep 3 hourly backups | |
| NUM_BACKUPS_TO_KEEP=3 | |
| # Who wants to know when the backup failed, or | |
| # when the binary logs didn't get applied |