Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Dbank daisukenagata

:octocat:
Focusing
View GitHub Profile
@daisukenagata
daisukenagata / file0.txt
Last active Oct 29, 2016
Swift3.0 アプリ内課金 非消耗型の対応を実施する。 ref: http://qiita.com/daisukenagata/items/fc653bf358927e24d24e
View file0.txt
import StoreKit
@daisukenagata
daisukenagata / file0.txt
Last active Jul 23, 2018
MOSA Software Meeting in 湘南 2016に行ってみた。 ref: https://qiita.com/daisukenagata/items/23d996a4d7d1fdc33a0f
View file0.txt
SFSpeechRecognitionTask
@daisukenagata
daisukenagata / file0.txt
Last active Nov 28, 2017
Realm Advent Calendar 2016 25日目 Realm Mobile PlatForm beta Swift3 with 実機 ref: https://qiita.com/daisukenagata/items/f4cf06457b17053dbd7f
View file0.txt
static let syncHost = "Macのipアドレスを入力"
@daisukenagata
daisukenagata / gist:d24f287b7236622afd0834c853773a66
Last active Oct 10, 2018
Mailを転送ロジック->Jsonを出力先のHtmlにdump
View gist:d24f287b7236622afd0834c853773a66
<?php
// バッファリング開始
ob_start();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="application/json; charset=utf-8" />
<title></title>
</head>
View Any 型の検索 配列の要素削除
struct Abc1 {
var asd = 1
}
struct Abc2 {
var asd = 2
}
struct Abc3 {
var asd = 3
@daisukenagata
daisukenagata / gist:7a5d2e73999169ea47ae369f3fb5146f
Last active Apr 21, 2019
配列の重複していない要素数を検索して、該当の要素を配列に入れるロジック
View gist:7a5d2e73999169ea47ae369f3fb5146f
import UIKit
//配列の重複していない要素数を検索して、該当の要素を配列に入れるロジック
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let searchWords = ["a","b","c","d","d","c","e","e"]
let orderedSet = NSOrderedSet(array: searchWords)
let orderArray = (orderedSet.array as? [String])!
View gist:ae1d9913885e126842bca2f096c15688
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "A", "D": "G()"},
{"value": "B", "E": "H()"},
{"value": "C", "F": "K()"}
]
}
View gist:d1089e412219c023e22686c97b5227fa
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
View gist:4bafcbd5c11461c76140e8d9df3c68c5
import UIKit
class ViewController: UIViewController {
let caButton = UIButton()
override func viewDidLoad() {
super.viewDidLoad()
caButton.backgroundColor = .yellow
caButton.frame = CGRect(x: 320, y: 20, width: 0, height: 0)
View gist:974425a333e5592f344490585734cff7
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings
class MainActivity : AppCompatActivity() {
private lateinit var remoteConfig: FirebaseRemoteConfig
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)