Skip to content

Instantly share code, notes, and snippets.

View willcraft's full-sized avatar
🎯
Focusing

Yoshitaka Sasaki willcraft

🎯
Focusing
View GitHub Profile
@willcraft
willcraft / main.go
Created January 9, 2018 08:14 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@willcraft
willcraft / BeaconTrigger.m
Created May 16, 2014 06:11
BeaconTrigger
#import "BeaconTrigger.h"
@interface BeaconTrigger () <CLLocationManagerDelegate>
@property (nonatomic) CLLocationManager *locationManager;
@property (nonatomic) CLBeaconRegion *beaconRegion;
@property (nonatomic) NSMutableDictionary *beacons;
@property (nonatomic, copy) FoundBeaconHandler foundBeaconHandler;
@property (nonatomic, copy) RegionHandler regionHandler;
@willcraft
willcraft / PRLocationManager.m
Last active August 29, 2015 14:01
PRLocationManager
#import "PRLocationManager.h"
#define GPS_ACCURACY 100.0f
#define LOCATION_TIMEOUT 3.0f
@interface PRLocationManager () <CLLocationManagerDelegate>
{
NSMutableArray *_callbacks;
CLLocationManager *_locationManager;