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
Looking into how to retrieve SMS archives from iOS 6. | |
Useful resources: | |
http://lasc.livejournal.com/284909.html | |
To explain the datetime mangling: | |
"The timestamps are not traditional timestamps of the number of seconds from 1/1/1970, but are instead based on the number of seconds from 1/1/2001 (so, there is a 31 year offset). So, we have to add the number of seconds in 31 years (978264705) to the timestamp to change it to a traditional timestamp giving the number of seconds from 1/1/1970." | |
Query below will pull a history of all message to and from the PHONE NUMBER specified. |
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
Before doing the initial setup, grab the following from apt-get: | |
$ sudo apt-get install zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-dev git-core | |
Head over to: | |
http://octopress.org/docs/setup/ | |
Install rbenv as described: | |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv |
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
A dirty little script to grab performance stats from Rails production.log file. | |
To speed up I recommend grep'ing out relevant lines: | |
egrep ('Started'|'Completed') production.log > output.txt | |
Will give you a CSV file which you can quickly plot in Excel. |
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
Example of how to use Windows Platform SDK shared memory functions between C and C#. | |
Code borrowed from: | |
http://www.albahari.com/nutshell/ch22.aspx | |
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366551(v=vs.85).aspx |
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
A little test of sqlite3 thread safety across multiple processes. | |
Ensure sqlite is built with: | |
#define SQLITE_THREADSAFE 1 | |
poll.c will create database and table if necessary and start polling for inserts. | |
writer.c will insert the current time into the db once every second. | |
TimerQueue code borrowed from: |
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 <stdio.h> | |
#include <sqlite3.h> | |
int main(void) | |
{ | |
sqlite3 *db; | |
sqlite3_stmt *stmt; | |
sqlite3_open("expenses.db", &db); |
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
<!DOCTYPE html> | |
<html lang="en-GB"> | |
<head> | |
<title>iTunes slider</title> | |
<link rel="stylesheet" href="style.css" type="text/css" /> | |
<script type="text/javascript" src="js/jquery.js"></script> | |
<script type="text/javascript" src="js/slider.js"></script> | |
</head> |
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
#import <Foundation/Foundation.h> | |
@interface MyManager : NSObject { | |
NSString *someProperty; | |
} | |
@property (nonatomic, retain) NSString *someProperty; | |
+ (id)sharedManager; | |
NewerOlder