Skip to content

Instantly share code, notes, and snippets.

View agathe's full-sized avatar

Agathe agathe

View GitHub Profile
Verifying that "agathe.id" is my Blockstack ID. https://onename.com/agathe
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
@weakify(self);
DDLogDebug(@"application:didReceiveRemoteNotification:fetchCompletionHandler: %@", userInfo);
if (userInfo[@"layer"]){
[[[[CAPUserController sharedUserController] layerClient]
rac_synchronizeWithRemoteNotification:userInfo]
subscribeNext:^(LYRMessage *message) {
if (message){
NSString *alertString = userInfo[@"aps"][@"alert"];
// Based on algorithm at http://www.andrews.edu/~tzs/timeconv/timeconvert.php
// Leap times
NSArray* getleaps() {
NSArray * leaps = @[
@(46828800), @(78364801), @(109900802), @(173059203), @(252028804), @(315187205), @(346723206),
@(393984007), @(425520008), @(457056009), @(504489610), @(551750411), @(599184012), @(820108813),
@(914803214), @(1025136015)
];
@agathe
agathe / gist:3063915
Created July 7, 2012 02:21
Error installing cairomm with brew
> brew install cairomm
==> Downloading http://cairographics.org/releases/cairomm-1.10.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cairomm-1.10.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/cairomm/1.10.0
==> make install
Making install in cairomm
/bin/sh ../libtool --tag=CXX --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H -I.. -I.. -I. -I/usr/local/Cellar/cairo/1.12.2/include -I/usr/local/Cellar/pixman/0.26.2/include -isystem /usr/local/include -Wall -Os -w -pipe -march=native -Xclang -target-feature -Xclang -aes -Qunused-arguments -mmacosx-version-min=10.7 -c -o context.lo context.cc
/bin/sh ../libtool --tag=CXX --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H -I.. -I.. -I. -I/usr/local/Cellar/cairo/1.12.2/include -I/usr/local/Cellar/pixman/0.26.2/include -isystem /usr/local/include -Wall -Os -w -pipe -march=native -Xclang -target-feature -Xclang -aes -Qunused-arguments -mmacosx-version-min=10.7 -c -o context_surface_quartz.lo context_surface_quartz.cc
/bin/sh ../libtool --tag=CXX
@agathe
agathe / cairomm.rb
Created July 7, 2012 01:56
Homebrew cairomm Formula
require 'formula'
class Cairomm < Formula
homepage 'http://cairographics.org/cairomm/'
url 'http://cairographics.org/releases/cairomm-1.10.0.tar.gz'
sha256 '068d96c43eae7b0a3d98648cbfc6fbd16acc385858e9ba6d37b5a47e4dba398f'
depends_on 'pkg-config' => :build
depends_on 'libsigc++'
depends_on 'cairo'
@agathe
agathe / gist:2956101
Created June 19, 2012 19:38
VBA Excel - Convert each sheet to CSV - For MAC
Function SaveAllSheetsAsCSV(outputPath As String)
On Error GoTo Heaven
' each sheet reference
Dim Sheet As Worksheet
' path to output to
'Dim outputPath As String
' name of each csv
Dim OutputFile As String