Skip to content

Instantly share code, notes, and snippets.

View nukosuke's full-sized avatar
🍊
🐈 🐈 🐈

nukosuke nukosuke

🍊
🐈 🐈 🐈
View GitHub Profile
#!/bin/bash
# 使いかた
# source ec2ssh.bash
# ec2ssh
#
# インストール方法
# echo "[ -f ~/ec2ssh.bash ] && source ~/ec2ssh.bash" >> ~/.bashrc
#
# 依存
# fish-modus-vivendi color theme
set -l foreground ffffff # fg-main
set -l comment a8a8a8 # fg-alt
set -l selection 34cfff # blue-active
# *-intense color
set -l red fe6060
set -l orange fba849
set -l green 4fe42f
set -l yellow f0dd60
@nukosuke
nukosuke / kanji.ex
Created August 11, 2022 04:25
Elixir 漢字判定モジュール
defmodule Kanji do
@moduledoc """
漢字かどうかを判定する
## Usage
iex(1)> Kanji.kanji?(?漢)
true
iex(2)> Kanji.kanji?(?A)
@nukosuke
nukosuke / fixed-method-names.ts
Last active February 26, 2019 09:17
諸事情によりメソッド名を変更すると壊れるアプリケーションのためのメソッド名変更禁止Docorator
function StaffAction(args: { nameMustBe: string }) {
return (target: any, name: string, descriptor: PropertyDescriptor) => {
if (args.nameMustBe !== name) {
throw new Error(`
!!! FATAL: ${name}() !!!
Fixed method name has changed. This change will breake application.
Please revert the method name to "${args.nameMustBe}".
`);
}
};
;;
;; magit
;;
(use-package magit
:bind
("C-c C-v" . magit-dispatch-popup))
;;
;; git-gutter
;;
@nukosuke
nukosuke / elixir-dev-util.sh
Last active December 26, 2018 14:14
elixir開発環境セットアップ手順
#!/bin/bash
ERLANG_OTP_VERSION="21.2"
ELIXIR_VERSION="1.7.0"
if ! type git > /dev/null 2>&1; then
echo "git is not installed"
exit 1
fi
@nukosuke
nukosuke / zendesk_api_req.go
Created November 26, 2018 03:59
go-zendesk Zendesk API Acc test
package main
import (
"fmt"
"github.com/nukosuke/go-zendesk/zendesk"
"net/http"
"os"
)
func main() {
@nukosuke
nukosuke / docker-compose.yml
Last active May 29, 2018 17:37
Concrete5 docker compose config for development
# Usage:
# $ git clone git@github.com:concrete5/concrete5.git
# $ cd concrete5
# $ cp /path/to/this/docker-compose.yml .
# $ docker compose up
concrete5:
image: php:7.2-alpine
command: |
sh -c "\
package main
import (
"bytes"
"crypto/md5"
"encoding/gob"
"fmt"
)
type Data struct {

Keybase proof

I hereby claim:

  • I am nukosuke on github.
  • I am nukosuke (https://keybase.io/nukosuke) on keybase.
  • I have a public key ASCe0M8irQmTnBikGaLfWFtB43cHQKK2kw5Vl_55iJX-0wo

To claim this, I am signing this object: