Skip to content

Instantly share code, notes, and snippets.

View matsuyoro's full-sized avatar

matsu matsuyoro

  • japan
View GitHub Profile
@matsuyoro
matsuyoro / smb.conf
Last active June 30, 2018 19:08
/etc/samba/smb.conf 指定ディレクトリを指定ユーザーだけsambaでアクセス可能に(Centos6.5+samba3.6)
[public]
# コメント
comment = Public space
# 共有するディレクトリのパス
path = /var/www/hoge
# guestユーザのアクセスを許可するか
guest ok = no
@matsuyoro
matsuyoro / gist:c53d82017b2763633e5b
Last active June 1, 2021 13:00
GAS(google app script)で指定ラベルのGmailをslackに通知
// slackのwebhook URL
var postUrl = "https://hooks.slack.com/services/xxxxxxxxxxx";
// 通知したいslackのチャネル(部屋)
var postChannel = "#n_app_review";
// 抽出元のGmailのラベル
var checkLabel = "TO_ME";
function myFunction() {
@matsuyoro
matsuyoro / file1.txt
Created February 6, 2015 12:55
swift 指定の文字列の位置を最後から検索 ref: http://qiita.com/matsuyoro/items/b7146ae0d79abf845989
pos 9223372036854775807
@matsuyoro
matsuyoro / file0.swift
Created February 6, 2015 14:15
Swift 指定位置の文字列を置換する ref: http://qiita.com/matsuyoro/items/b0e119256d498a03a60d
var str:NSString = "ABCDEFGHIJKLMNOP"
var pos = NSMakeRange(4,4) // 位置
println(str.stringByReplacingCharactersInRange(pos, withString: "hoge"))
// アプリバージョンをStringで
let version: String! = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") as? String
// 指定URLと文字連結
var myUrlStr:String = "http://hooogeee.com?v=" + version
// NSURL型に変換するなら
var myUrl:NSURL = NSURL(string:myUrlStr)!
@matsuyoro
matsuyoro / file0.txt
Last active April 11, 2016 23:58
Unity rigidbody2Dでよく使うメソッド一覧 ref: http://qiita.com/matsuyoro/items/e32b4fd12d20e5c06614
transform.localEulerAngles.z;
@matsuyoro
matsuyoro / file0.txt
Last active November 13, 2015 04:05
iOSアプリ等でwebviewを表示する際に、拡大はするがユーザーがピンチで拡大や、スクロールができないようにする。 ref: http://qiita.com/matsuyoro/items/2240b29e14d23bda102f
_webView.scalesPageToFit = YES;
@matsuyoro
matsuyoro / file0.cs
Created March 16, 2016 00:27
Unity Ads と Ad Colonyの動画SDKをUnity(C#)で一元管理したメモ(SDKだらけ〜〜w ref: http://qiita.com/matsuyoro/items/0959ba21a001d2dd7eca
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
// unity ads
using UnityEngine.Advertisements;
public class GameSceneSingleton {
@matsuyoro
matsuyoro / Podfile
Last active August 19, 2016 00:34
AdMobメディエーションでFAN(facebook audience network)を出す方法 ref: http://qiita.com/matsuyoro/items/6f402247d2e53df48e68
pod 'FBAudienceNetwork'
@matsuyoro
matsuyoro / file0.txt
Created August 22, 2016 05:21
storyboardで「Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.」というエラーがでた場合 ref: http://qiita.com/matsuyoro/items/9219c23a70c012d6e3e5
Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.