Skip to content

Instantly share code, notes, and snippets.

View hidekuro's full-sized avatar
🏠
Working from home

hidekuro

🏠
Working from home
  • Japan
  • 20:05 (UTC +09:00)
View GitHub Profile
@hidekuro
hidekuro / iceberg.json
Last active September 23, 2020 07:37 — forked from kshimi/iceberg.json
Iceberg color scheme for Windows Terminal
{
"name": "Iceberg",
"foreground": "#c6c8d1",
"background": "#161821",
"black": "#161821",
"red": "#e27878",
"green": "#b4be82",
"yellow": "#e2a478",
"blue": "#84a0c6",
"purple": "#a093c7",
@hidekuro
hidekuro / ValidatableModelBase.cs
Last active October 27, 2017 05:27
INotifyDataErrorInfoをサポートするBindableBase
/// <summary>
/// INotifyDataErrorInfoをサポートするBindableBase
/// </summary>
class ValidatableModelBase : BindableBase, INotifyDataErrorInfo
{
private ErrorsContainer<string> _errors;
public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;
public IEnumerable GetErrors(string propertyName)
@hidekuro
hidekuro / parse_args_sample.sh
Created January 29, 2016 22:16
bash引数解析サンプル
declare -i argc=0
declare -a argv=()
while (( $# > 0 )); do
case "$1" in
- | -- )
shift
argc+=$#
argv+=("$@")
break
;;
@hidekuro
hidekuro / check_required_vars.sh
Created January 25, 2016 09:47
複数の変数名の変数値存在チェックを行うBashスクリプト断片
#!/bin/bash
# required variables
required_vars=("FOO" "BAR" "BAZ")
# check defined
for VAR_NAME in "${required_vars[@]}"; do
eval var_temp='$'$VAR_NAME
if [[ -z "$var_temp" ]]; then
echo "$VAR_NAME is undefined." 1>&2