Skip to content

Instantly share code, notes, and snippets.

😃
Enjoy!

Yuki Suwa suwa-yuki

😃
Enjoy!
Block or report user

Report or block suwa-yuki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@suwa-yuki
suwa-yuki / ClosedRange.swift
Last active Aug 1, 2017
TDDワークショップ成果物 http://bit.ly/2uEATGA
View ClosedRange.swift
import Foundation
struct ClosedRange {
let lowerEndpoint: Int
let upperEndpoint: Int
init?(lowerEndpoint: Int, upperEndpoint: Int) {
guard lowerEndpoint < upperEndpoint else { return nil }
self.lowerEndpoint = lowerEndpoint
self.upperEndpoint = upperEndpoint
View GADViewController.m
#import "GADBannerView.h"
// Google AdMob
static NSString *const ADMOB_ID = @"YOUR_ADMOB_ID";
static NSString *const ADMOB_IPAD_ID = @"YOUR_ADMOB_ID";
@interface GADViewController () <GADBannerViewDelegate>
@property (weak, nonatomic) IBOutlet GADBannerView *adBannerView;
@suwa-yuki
suwa-yuki / UIViewController+Analytics.h
Created Dec 15, 2014
Google AnalyticsをUIViewControllerで使う
View UIViewController+Analytics.h
@implementation UIViewController (Analytics)
- (void)startScreen:(NSString*)screenName
{
// Google Analytics
id tracker = [[GAI sharedInstance] defaultTracker];
[tracker set:kGAIScreenName value:screenName];
[tracker send:[[GAIDictionaryBuilder createAppView] build]];
}
@suwa-yuki
suwa-yuki / App.java
Last active Aug 29, 2015
AndroidでApplicationContextをどこからでも取得できるようにする
View App.java
package jp.sample.core;
import android.app.Application;
import android.content.Context;
/**
* .
*/
public class App extends Application {
You can’t perform that action at this time.