Skip to content

Instantly share code, notes, and snippets.

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

nukosuke nukosuke

🍊
🐈 🐈 🐈
View GitHub Profile
# 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 / Makefile
Created October 22, 2016 02:31
みんなのGo言語に載っているMakefileタスクのテンプレ
# メタ情報
NAME := myproj
VERSION := $(shell git describe --tags --abbrev=0)
REVISION := $(shell git rev-parse --short HEAD)
LDFLAGS := -X 'main.version=$(VERSION)' \
-X 'main.revision=$(REVISION)'
# 必要なツール類をセットアップする
## Setup
setup:
@nukosuke
nukosuke / install-emacs-macos.sh
Last active March 8, 2019 03:04
Install emacs on macOS
#!/bin/sh
git clone https://git.savannah.gnu.org/git/emacs.git
cd emacs
./configure --with-ns --with-mailutils --without-makeinfo --with-module
make -j8
sudo make install
@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 "\
@nukosuke
nukosuke / react-universal.md
Last active May 22, 2018 06:57
React Universalアプリケーション勉強会

概要

React Universalアプリケーション勉強会のための覚書。

Universal

isomorphic(あいそもーふぃっく)とも言う。クライアントでもサーバでも同じようにレンダリングされ動作するアプリケーションのこと。 最近ではReact Nativeなどを使ったモバイルアプリケーションも含めUniversalと言うことが多い。

技術スタック

使用する技術スタックは次の通り。