Skip to content

Instantly share code, notes, and snippets.

suzuki.sh s2terminal

Block or report user

Report or block s2terminal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@s2terminal
s2terminal / ordinalNumber.ts
Last active Jul 14, 2019
TypeScriptの型で順序数を定義して、1+2が3であることをプログラムを動かさずに型定義で示す
View ordinalNumber.ts
// http://www.typescriptlang.org/play/#code/PTAEHkCcBMEsDsCGAbUA5ArgWwEYFNJRo8AzBWAF1gHt4AoCgTwAc9QBJeAY0jyz3gUAPABUAfKAC8oANoiAugG4GLNuHhtpMpStagRAd2qgTUjt179BQ9XjHKmekQAtebM5x58Bww9Xu6bABi1BiEJtKelj6irnh2ynQgoADCtF4UbCQY3FS0dNm5NPCgzMgYAM62omIAFABuKABc+gCULVHe1uKgAN50JrwUYSUyjcg6AL50SWBpFniZoPDY+JB0XLQVFKC0eC22ZtrKm-DboBRGLX5mZZW2tXutiafnvBUYyDvSd1UatZdqM8NlsduMAILXIymaTvT4URSgZIAUUgkGo61eYJQACFrnFNKA4V8TqDQOMUi0QmEIkS8B8SUiwKj0esgA
// Ordinal Number definition
type Increment<T> = [T];
type One = [];
type Two = Increment<One>;
type Three = Increment<Two>;
type Four = Increment<Three>;
// Concrete function
@s2terminal
s2terminal / .gitlab-ci.yml
Created May 7, 2019
YARD documents on GitLab Pages
View .gitlab-ci.yml
image: ruby:2.6.1-alpine
pages:
script:
- apk add --update --no-cache build-base libxml2-dev libxslt-dev libstdc++ tzdata mariadb-dev nodejs ca-certificates yarn
- bundle install --path vendor
- bundle exec yard
- rm -rf public
- mv doc public
artifacts:
@s2terminal
s2terminal / docker-compose.yml
Last active Apr 26, 2019
Growi on Azure Web App for Containers
View docker-compose.yml
# cf. https://github.com/weseek/growi-docker-compose/blob/master/docker-compose.yml
#
version: '3'
services:
growi:
image: weseek/growi:3.4.4
links:
mongo: mongo
depends_on:
@s2terminal
s2terminal / hatenablog_custom.css
Created Jan 2, 2018
はてなブログ用カスタムCSS
View hatenablog_custom.css
/* <system section="theme" selected="6653586347149180725"> */
@import url("http://hatenablog.com/theme/6653586347149180725.css");
/* </system> */
/* <system section="background" selected="undefined"> */
/* </system> */
/* custom css @s2terminal */
/* テーブル */
@s2terminal
s2terminal / extensions.json
Last active Dec 4, 2018
VSCode workspace setting for text writing
View extensions.json
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
"visualstudioexptteam.vscodeintellicode",
// Japanese
"MS-CEINTL.vscode-language-pack-ja",
"ICS.japanese-proofreading",
View Dockerfile
# run $> docker build . --tag textlinter
# run $> docker run --volume "$(pwd):/root" --rm textlinter /root/node_modules/.bin/textlint target.md
# cf. https://dev.classmethod.jp/devenv/atom-textlint-proofreading/
# cf. https://kuroeveryday.blogspot.jp/2017/07/running-nodejs-app-in-docker.html
FROM node:latest
ADD ./ /root
WORKDIR /root
RUN npm install --save-dev prh textlint textlint-rule-preset-ja-technical-writing textlint-rule-prh textlint-rule-spellcheck-tech-word
@s2terminal
s2terminal / purge.scpt
Created May 15, 2016
Macのメモリ解放用JXA(JavaScript for Automation)
View purge.scpt
var app = Application.currentApplication();
app.includeStandardAdditions = true;
app.doShellScript("sudo purge", {administratorPrivileges:true, withPrompt:"sudo purge"});
app.displayDialog("purged");
@s2terminal
s2terminal / request_azure_ml.rb
Created Apr 10, 2016
Azure Machine Learning Web サービス Ruby版コード
View request_azure_ml.rb
def request_azure_ml(request_uri, twitter_user_id, api_key)
uri = URI.parse(request_uri)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
req = Net::HTTP::Post.new(uri.request_uri)
req["Content-Type"] = 'application/json'
req["Authorization"] = 'Bearer ' + api_key
req.body = {
@s2terminal
s2terminal / eging.js
Created Apr 2, 2016
Splatoonイカリングのデータを取ってテーブルにするやつ
View eging.js
// [イカリング](https://splatoon.nintendo.net/)にアクセスしてログインし、コンソールで下記実行
// ※イカリングはjQueryではなく[Zepto.js](http://zeptojs.com/)使用
var data = {};
// https://splatoon.nintendo.net/ranking
//$('.icon-navi-ranking').trigger('click');
data['ranking'] = {};
var setRankingScore = function($rankDetail, rule){
var name = $rankDetail.find('.rank-username').text();
View sample.cs
public static void Main() {
System.Console.WriteLine("Hello, world!");
}
You can’t perform that action at this time.