This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/.ssh/config | |
Host * | |
UseKeychain yes | |
AddKeysToAgent yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Accounts | |
import Social | |
class SNSLinkManager: NSObject { | |
static func linkTwitterAccount(viewController: UIViewController, completion: @escaping (ACAccount?) -> ()) { | |
let accountStore = ACAccountStore() | |
let accountType = accountStore.accountType(withAccountTypeIdentifier: ACAccountTypeIdentifierTwitter) | |
accountStore.requestAccessToAccounts(with: accountType, options: nil) { (succes, error) in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class User: NSObject, NSCoder { | |
static let sharedInstance = User() | |
var name: String = "" | |
var email: String = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// User.swift | |
// WaterLand | |
// | |
// Created by fujiwara on 2016/12/15. | |
// Copyright © 2016年 fujiwara. All rights reserved. | |
// | |
import UIKit | |
import KeychainAccess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Declare outside class definition (or in its own file). | |
// 2. UIKit must be included in file where this code is added. | |
// 3. Extends UIDevice class, thus is available anywhere in app. | |
// | |
// Usage example: | |
// | |
// if UIDevice().type == .simulator { | |
// print("You're running on the simulator... boring!") | |
// } else { | |
// print("Wow! Running on a \(UIDevice().type.rawValue)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http') | |
var url = 'http://itunes.apple.com/jp/rss/topsongs/limit=100/xml'; | |
var rss = ''; | |
var req = http.get(url, function (res) { | |
// テキストファイルの場合は、エンコード指定は重要! | |
res.setEncoding('utf8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bleacon = require('bleacon'); | |
//uuidgenで生成したID(ハイフン除く)を記述する | |
var uuid = 'C6094E809AE04186A2288EC79D7DA8B0'; | |
var major = 0; | |
var minor = 0; | |
var measuredPower = -59; | |
Bleacon.startAdvertising(uuid,major,minor, | |
measuredPower); | |
console.log('ble running ....') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Excel = require('exceljs') | |
var fs = require('fs') | |
var util = require('util') | |
var targetExcelPath = "リスト.xlsx" | |
// ワークブック指定 | |
var workbook = new Excel.Workbook(); | |
// ファイルを読み込み |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X GET "https://" -O \ | |
-H "Accept:" \ | |
-H "Authorization:Bearer " |