Skip to content

Instantly share code, notes, and snippets.

View suwa-yuki's full-sized avatar
😃
Enjoy!

Yuki Suwa suwa-yuki

😃
Enjoy!
View GitHub Profile
@suwa-yuki
suwa-yuki / app.js
Last active March 5, 2020 06:31
Auth0 Webinar Scripts
// The Auth0 client, initialized in configureClient()
let auth0 = null;
/**
* Starts the authentication flow
*/
const login = async (targetUrl) => {
try {
console.log("Logging in", targetUrl);
@suwa-yuki
suwa-yuki / ClosedRange.swift
Last active August 1, 2017 09:40
TDDワークショップ成果物 http://bit.ly/2uEATGA
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
@suwa-yuki
suwa-yuki / GADViewController.m
Last active August 29, 2015 14:11
AdMobの実装
#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 December 15, 2014 10:39
Google AnalyticsをUIViewControllerで使う
@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 August 29, 2015 13:57
AndroidでApplicationContextをどこからでも取得できるようにする
package jp.sample.core;
import android.app.Application;
import android.content.Context;
/**
* .
*/
public class App extends Application {