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
#!/usr/bin/perl -w | |
# Copyright (C) 2022 by Kazuyuki Ono <shout@noisyspot.jp> | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any purpose | |
# with or without fee is hereby granted. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
# FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>画像の上に矩形を描画するサンプル</title> | |
<script> | |
const imageUrl = "https://example.com/some/image/url"; | |
const baundaryBox = { x: 0.4, y: 0.4, width: 0.2, height: 0.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
--enable-sockets | |
--enable-exif | |
--with-zlib | |
--with-zlib-dir=/usr/local/opt/zlib | |
--with-bz2=/usr/local/opt/bzip2 | |
--enable-intl | |
--with-kerberos | |
--with-openssl | |
--enable-soap | |
--enable-xmlreader |
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
FROM java:9-jdk | |
EXPOSE 8000 | |
VOLUME ["/dynamodb/data"] | |
RUN mkdir -p /dynamodb | |
WORKDIR /dynamodb | |
# see https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html | |
RUN wget https://s3-ap-northeast-1.amazonaws.com/dynamodb-local-tokyo/dynamodb_local_latest.tar.gz -qO ./dynamodb_local.tar.gz \ |
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
sudo apt-get update | |
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-commo | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null | |
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' | |
sudo apt-get update | |
sudo apt-get install -y docker-ce code |
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
# Make a temporary dir, and remove when exit. | |
TEMPDIR=$(mktemp -d) | |
trap "rm -rf ${TEMPDIR}" EXIT |
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 | |
# | |
# git-completion & git-prompt を導入するスクリプト(for bash) | |
# git, curl, unzip を事前にインストールしておくこと | |
# | |
set -eux | |
set -o pipefail |
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
public ViewObject getViewObject(String bindingName) { | |
BindingContext ctx = BindingContext.getCurrent(); | |
ControlBinding b = | |
ctx.getCurrentBindingsEntry().getControlBinding(bindingName); | |
if (b == null) { | |
throw new IllegalArgumentException(bindingName + " is not found."); | |
} | |
if (! (b instanceof DCControlBinding)) { | |
throw new IllegalArgumentException(bindingName + " is not DCControlBinding."); | |
} |
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
(define (fringe items) | |
(define (fringe-iter items res) | |
(cond ((null? items) res) | |
((pair? (car items)) | |
(fringe-iter (append (car items) (cdr items)) res)) | |
(else | |
(fringe-iter (cdr items) (cons (car items) res))))) | |
(reverse (fringe-iter items (list)))) |
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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Inverse Fizzbuzz (for Java) | |
* http://www.jasq.org/2/post/2012/05/inverse-fizzbuzz.html | |
*/ | |
public class InvFizzBuzz { | |
public List<Integer> process(String[] args) { |
NewerOlder