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
| <?php | |
| // php -S localhost:8012 | |
| $strUrl = "https://coincheck.com/api/ec/buttons"; | |
| $intNonce = time(); | |
| $strCallbackUrl = "https://requestb.in/1kscq6s1"; | |
| $arrQuery = array("button" => array( | |
| "name" => "注文 #123", | |
| "currency" => "JPY", |
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
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew install graphviz libxml2 rbenv rbenv-gemset redis ruby-build v8 libevent imagemagick@6 mysql | |
| brew tap homebrew/services | |
| brew services run mysql | |
| brew services run redis | |
| rbenv install 2.4.0 | |
| rbenv rehash |
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
| #!/usr/bin/env ruby | |
| require 'payjp' | |
| require 'pry' | |
| Payjp.api_key = ENV.fetch('PAYJP_API_KEY', nil) | |
| card = Payjp::Token.create( | |
| card: { | |
| number: '4242424242424242', |
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
| { | |
| "images" : [ | |
| { | |
| "size" : "20x20", | |
| "idiom" : "iphone", | |
| "filename" : "[email protected]", | |
| "scale" : "2x" | |
| }, | |
| { | |
| "size" : "20x20", |
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
| @IBAction func showPicker(_ sender: Any) { | |
| guard | |
| let button = sender as? UIButton, | |
| let label = view.viewWithTag(button.tag + 100) as? UILabel, | |
| let title = label.text | |
| else { return } | |
| let message = "\n\n\n\n\n\n\n\n\n" | |
| let av = UIAlertController(title: title, message: message, preferredStyle: .alert) | |
| let done = UIAlertAction(title: "Done", style: .default) { _ in | |
| av.dismiss(animated: true, completion: nil) |
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
| find source/images -type f -name '*.jpg' -exec sh -c 'S=$(git status -s {} | cut -f1); [[ $S == \ M\ * ]] || echo {}' \; |
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
| export V=v1.0.0 | |
| git checkout $V && git tag -d $V && git push origin :refs/tags/$V && GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -sa $V -m"$V" |
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
| #!/bin/bash | |
| base_dir=`pwd` | |
| curl -Lo mecab-0.996.tar.gz 'https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7cENtOXlicTFaRUE' | |
| tar zxfv mecab-0.996.tar.gz | |
| cd mecab-0.996 | |
| ./configure --enable-utf8-only | |
| make | |
| make check |
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
| CREATE TABLE "article_tags" ("article_id" INTEGER NOT NULL REFERENCES "articles" ("id"), "tag_name" VARCHAR NOT NULL REFERENCES "tags" ("name")); | |
| CREATE TABLE "articles" ("id" INTEGER PRIMARY KEY, "title" VARCHAR); | |
| CREATE TABLE "tags" ("name" VARCHAR PRIMARY KEY NOT NULL UNIQUE); | |
| INSERT INTO "article_tags" ( "article_id","tag_name" ) VALUES ( '10','タグ1' ); | |
| INSERT INTO "article_tags" ( "article_id","tag_name" ) VALUES ( '10','タグ2' ); | |
| INSERT INTO "article_tags" ( "article_id","tag_name" ) VALUES ( '10','タグ3' ); | |
| INSERT INTO "article_tags" ( "article_id","tag_name" ) VALUES ( '10','タグ4' ); | |
| INSERT INTO "article_tags" ( "article_id","tag_name" ) VALUES ( '10','タグ5' ); | |
| INSERT INTO "article_tags" ( "article_id","tag_name" ) VALUES ( '10','タグ6' ); | |
| INSERT INTO "article_tags" ( "article_id","tag_name" ) VALUES ( '10','タグ7' ); |
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
| datamap = map(); | |
| datamap.put("module", "Accounts"); | |
| respMap = zoho.crm.invokeConnector(("crm.get"), datamap); | |
| respText = respMap.get("response"); | |
| data2map = respText.getJSON("data").toJSONList().get(0); | |
| createdTime = data2map.getJSON("Created_Time").toList("+"); | |
| offsetPositive = 1; | |
| offsetHour = 0; | |
| if (createdTime.size() == 1) { | |
| createdTime = createdTime.get(createdTime.size() - 1).toList("-"); |