This file contains hidden or 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 scala.collection.mutable | |
/** | |
* Created by okayayohei on 2017/03/11. | |
*/ | |
object Main { | |
trait Fib { | |
def fib(n: Long): Long | |
} |
This file contains hidden or 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
mysql> desc shop; | |
+---------+--------------+------+-----+---------+-------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+---------+--------------+------+-----+---------+-------+ | |
| name | varchar(100) | NO | | NULL | | | |
| address | varchar(100) | NO | | NULL | | | |
| lnglat | geometry | NO | MUL | NULL | | | |
+---------+--------------+------+-----+---------+-------+ | |
3 rows in set (0.04 sec) |
This file contains hidden or 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
gvm install go1.4 | |
gvm use go1.4 | |
gvm install go1.5 |
This file contains hidden or 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
#if PRODUCTION | |
let filePath = NSBundle.mainBundle().pathForResource("GoogleService-Info-pro", ofType: "plist") | |
#elseif STAGING | |
let filePath = NSBundle.mainBundle().pathForResource("GoogleService-Info-stg", ofType: "plist") | |
#else | |
let filePath = NSBundle.mainBundle().pathForResource("GoogleService-Info-dev", ofType: "plist") | |
#endif | |
let firebaseOption = FIROptions(contentsOfFile: filePath) | |
FIRApp.configureWithOptions(firebaseOption) |
This file contains hidden or 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
# APIGateway + Lambda + DynamoDB | |
# sample query | |
# {"tableName":"performance_test","operation":"read","payload": {"test_id":"aaaaaaa"}} | |
# {"tableName":"performance_test","operation":"delete","payload": {"test_id":"aaaaaaa"}} | |
# {"tableName":"performance_test","operation":"create","payload": {"test_id":"aaaaaaa","value":"aaaaaaaaa"}} | |
import boto3 | |
import json | |
print('Loading function') |
This file contains hidden or 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
def convertLine(line) | |
# 可読性のため一次変数に受ける | |
result = line.gsub("]","").gsub("[","").gsub("UNIQUEIDENTIFIER","NVARCHAR (38)") | |
result = result.gsub("NVARCHAR \(MAX\)","NVARCHAR \(256\)") | |
result.gsub("DATETIMEOFFSET (7)","TIMESTAMP").gsub("sys.geography","geometry") | |
end | |
def convertDDL(path) | |
@inDDL = false | |
@isGEO = false |
This file contains hidden or 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
def convertLine(line) | |
line = line.gsub("]","").gsub("[","") | |
line = line.gsub(" +09:00","") | |
# 変換候補文字列を抽出 | |
# ex. N'POINT (0 0)' -> GeomFromText('POINT (0 0)') | |
points = line.scan(/N'POINT \(.+?\)'/) | |
points.each do |point| | |
line = line.gsub(point,point.gsub("N'","GeomFromText('").gsub(")'",")')")) | |
end | |
line + ";" |
This file contains hidden or 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
void SampleScene::onEnter() | |
{ | |
〜略〜 | |
// 時間があっているかチェックする | |
NtpChecker::sharedInstance()->check(this, ntpchecker_selector(SampleScene::bonus)); | |
} | |
void SampleScene::bonus(NtpResult result) | |
{ |
This file contains hidden or 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
for i in *.png ; do /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC --bits-per-pixel-4 -o "${i%.png}.pvr}" -f PVR $i ; done |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ |