This file contains 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 | |
if [ -z "$EKISPERT_KEY" ]; then | |
echo '$EKISPERT_KEY not set' | |
exit 1 | |
fi | |
if [ $# -lt 2 ]; then | |
echo 'Usage: norikae from_station to_station (search_time:HHMM)' | |
exit 1 |
This file contains 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
/** | |
* Word型 | |
* @typedef {object} Word | |
* @prop {string} type - ワードの種類 | |
* @prop {number} priority? - ワード(演算子)の優先度(大きいほど高い) | |
* @prop {number} value? - ワード(数値)の値 | |
*/ | |
/** |
This file contains 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
echo -n 'r=90;a[0]=$((1<<15));for h in {0..15};{ l="";for p in {30..0};{ t=${a[h]};[ $((t>>p&1)) = 1 ] && l="${l}💩" || l="${l} ";q=$(((t>>(p+1)%31&1)*4+(t>>p&1)*2+(t>>(p-1)%31&1)));a[$((h+1))]=$((a[h+1]|(r>>q&1)<<p));};echo "${l}";}' | bash |
This file contains 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
function map(value, start1, stop1, start2, stop2) = start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1)); | |
module henon_map(x1, x2, y1, y2, zsize, zpos) | |
{ | |
a = 1.4; | |
b = 0.3; | |
ls = [ | |
for(i=0, tx=0.0,ty=0.0,x=0.1,y=0.0;i<22000; i=i+1,tx=1-a*x*x+y,ty=b*x,x=tx,y=ty) | |
[i, [map(x, -1.5, 1.5, x1,x2), map(y, -0.5, 0.5, y1,y2), zpos]] | |
]; |
This file contains 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
ZSH_THEME="powerlevel9k/powerlevel9k"↲ | |
POWERLEVEL9K_MODE='nerdfont-complete'↲ | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(time dir vcs)↲ | |
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()↲ | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=true↲ |
This file contains 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
object M{val W=200;val H=80;def m(v:Float,a:Float,b:Float,c:Float,d:Float)=c+(d-c)*((v-a)/(b-a));def r(a:Float,b:Float,x:Float,y:Float,c:Int):Int=if(Math.abs(x*x+y*y)>2) c else if(c>999) 0 else r(a,b,x*x-y*y+a,2*x*y+b,c+1);def c(a:Float,b:Float)=r(a,b,0,0,0);def main(a:Array[String])=for(j<-(0 to H).map(m(_,0,H,-2,2))){for(i<-(0 to W).map(m(_,0,W,-2,2))){print(if(c(i,j)==0) 2 else 9)};println()}} |
This file contains 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
version: '3' | |
services: | |
mysql: | |
image: mysql/mysql-server:5.7 | |
ports: | |
- "3306:3306" | |
environment: | |
- MYSQL_ALLOW_EMPTY_PASSWORD=yes | |
- MYSQL_ROOT_HOST=% |
This file contains 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
object Main { | |
def main(args: Array[String]): Unit = { | |
def map[T, U](ls: List[T])(f: T => U): List[U] = ls.foldRight(Nil: List[U])((x, y) => f(x) :: y) | |
println(map(List(1, 2, 3))(x => x * 2)) | |
} |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#define MAX_READ 128 |
This file contains 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
function isServerAlive() { | |
var serverUrl = PropertiesService.getScriptProperties().getProperty('SERVER_URL'); | |
var options = { | |
muteHttpExceptions: true, | |
}; | |
var res = UrlFetchApp.fetch(serverUrl, options); | |
return res.getResponseCode() == 200; | |
} | |
function postMessage(msg) { |