Skip to content

Instantly share code, notes, and snippets.

View ruairif's full-sized avatar

Ruairí Ó Fathaigh ruairif

View GitHub Profile
@ruairif
ruairif / process.ipynb
Created October 26, 2015 11:07
Data processing for daft.ie
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#import <Foundation/Foundation.h>
#import <RestKit/RestKit.h>
#import "opcUtils.h"
@interface opcAPIRequests : NSObject
+ (NSMutableURLRequest*) sendRequestTo:(NSString*)relativeURL withMethod:(RKRequestMethod)reqMethod withUID:(NSString*)uid withKey:(NSString*)key;
+ (NSMutableURLRequest*) sendRequestTo:(NSString*)relativeURL withParams:(NSDictionary*)params withMethod:(RKRequestMethod)reqMethod withUID:(NSString*)uid withKey:(NSString*)key;
+ (NSMutableURLRequest*) sendRequestTo:(NSString*)relativeURL withParams:(NSDictionary*)params withMethod:(RKRequestMethod)reqMethod ;
@end
@ruairif
ruairif / set_date.py
Created February 13, 2014 13:22
Is NTP blocked on your network? Have you no access to a GPS? Does your computer complain about SSL certs? Then you might just need a quick and dirty time setting script.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''\
Instructions:
Make this script Executable::
chmod +x set_date.py
@ruairif
ruairif / onepagecrm.py
Created February 10, 2014 17:38
Interface with OnePageCRM REST API
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from hashlib import sha256
from hashlib import sha1
from time import time
import hmac
from base64 import b64decode
from datetime import datetime
import re