Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bright23
bright23 / ssh_password.txt
Last active May 15, 2018 11:11
public key置いてssh接続してるのに毎回パスワード聞かれる時
~/.ssh/config
Host *
UseKeychain yes
AddKeysToAgent yes
@bright23
bright23 / CodePiece.swift
Created September 24, 2017 08:33
twitter連携 #swift #CodePiece
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
import UIKit
class User: NSObject, NSCoder {
static let sharedInstance = User()
var name: String = ""
var email: String = ""
//
// User.swift
// WaterLand
//
// Created by fujiwara on 2016/12/15.
// Copyright © 2016年 fujiwara. All rights reserved.
//
import UIKit
import KeychainAccess
//
// EnumEnumerable+count.swift
// AdBlockSample
//
// Created by bright on 2016/11/08.
// Copyright © 2016年 bright. All rights reserved.
//
import Foundation
// 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)")
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');
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 ....')
var Excel = require('exceljs')
var fs = require('fs')
var util = require('util')
var targetExcelPath = "リスト.xlsx"
// ワークブック指定
var workbook = new Excel.Workbook();
// ファイルを読み込み
curl -X GET "https://" -O \
-H "Accept:" \
-H "Authorization:Bearer "