Skip to content

Instantly share code, notes, and snippets.

View dikiprawisuda's full-sized avatar

Diki Prawisuda dikiprawisuda

View GitHub Profile
@nifl
nifl / js-functions.md
Last active May 27, 2024 07:27
JS Functions

Functions

Functions are first–class citizens in JS, meaning that they can be passed around like any other type of data, eg, variables. http://en.wikipedia.org/wiki/First-class_function

Declared function

Declared functions build in memory immediately when the program loads.

Basic syntax

@us10096698
us10096698 / enc_converter.sh
Created October 28, 2013 03:06
Japanese Kanji File Encode Converter (from CP932/ISO-2022-JP-1/EUC-JP to UTF-8 with LF)
#!/bin/sh
#
# Japanese Kanji File Encode Converter (to UTF-8)
# Usage: $ sh ./enc_converter.sh "<FilePath>"
# <Filepath> is used for argument of "ls" command.
# Ex) sh ./enc_converter.sh "~/test/*.txt"
# Expect Output of 'file' Command
cp932="Non-ISO extended-ASCII text"
jis="ASCII text"