Skip to content

Instantly share code, notes, and snippets.

@yongteak
yongteak / gist:6170194
Created August 7, 2013 00:30
BattleFiled 2 CompletePack Key
special forces
FTRZ - DW5C - NNDM - U3MV - SQEF
BattleField 2
0P2A-DZB7-FIGH-TING-4FUN
4Y9H-G59A-V9Q6-QTB2-RG7R
FFNN-S9YP-5SWQ-4AY8-45MW
3CEE-CGN2-4RHM-AHJ7-FFM8
BR2J-HJQZ-3YT7-4U3E-VDM6
5UYY-FV5H-9W4V-65S4-ZBDP
@yongteak
yongteak / 0_reuse_code.js
Created May 22, 2014 07:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yongteak
yongteak / gist:6bf32e3eba5a8e52a641
Created August 25, 2014 08:42
MarkDown Example

An h1 header

Paragraphs are separated by a blank line.

2nd paragraph. Italic, bold, and monospace. Itemized lists look like:

  • this one
  • that one
@yongteak
yongteak / word_count.erl
Created January 27, 2016 10:14
word count
%% 콘솔에서 한글표현
%% erl +pc unicode
{ok,Data} = file:read_file("word.txt").
List = re:split(Data,"\\s+").
Dict =
lists:foldl(fun(Word,Acc)->
dict:update_counter(Word, 1, Acc)
end,dict:new(),List).
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [125.6, 10.1]
},
"properties": {
"name": "Dinagat Islands"
}
}
@yongteak
yongteak / install.sh
Last active October 8, 2019 05:16
Erlang 18.3 Install
#!/bin/bash
# installing erlang on ubuntu's
# curl https://gist.githubusercontent.com/yongteak/48e405b8a40a45be70713b9c8dcb255f/raw/8fcb722ad1201cea7d90d9be289d94120c2b645c/install.sh | bash
VERSION="18.3"
sudo apt-get install build-essential libncurses5-dev openssl libssl-dev xsltproc automake autoconf fop -y
sudo mkdir -p /opt/erlang/
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl && chmod a+x kerl
@yongteak
yongteak / working.dart
Created December 24, 2019 08:26
animator
import 'package:flutter/material.dart';
import 'package:animator/animator.dart';
import 'package:states_rebuilder/states_rebuilder.dart';
class MyBloc extends StatesRebuilder {
String animationSwitcher = 'opacity';
String animationName = 'Opacity';
changeAnimation(String switcher, String name) {
animationSwitcher = switcher;
@yongteak
yongteak / CantonCoin.daml
Created March 23, 2020 02:33
CantonCoin.daml
daml 1.2 module CantonCoin where
import DA.Next.Set (Set, union, size, singleton)
import DA.Next.Set qualified as S
import DA.Next.Map (MapKey)
import DA.List (head)
import DA.Foldable qualified as F
subset: MapKey a => Set a -> Set a -> Bool
subset s1 s2 = s1 == s1 `S.intersection` s2
@yongteak
yongteak / install.erlang.sh
Last active December 27, 2021 08:27
ubuntu asdf install erlang
# https://asdf-vm.com/#/
sudo apt update
sudo apt-get install -y nmon autoconf unzip openjdk-8-jdk curl lib32z1 libglu1-mesa gradle xz-utils git libqt5webenginewidgets5 libc6 libstdc++6 libgcc1 libz1 net-tools make build-essential checkinstall zlib1g-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev openssl libssl-dev libncurses5-dev libc6-dev libbz2-dev
git clone https://github.com/asdf-vm/asdf.git ~/.asdf && cd ~/.asdf && git checkout "$(git describe --abbrev=0 --tags)"
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
curl -O https://gist.githubusercontent.com/yongteak/19f9fcd70a7cc217e858a74158b00e9e/raw/8697cb1b40939a9bc7fbc5b45146b782d67a050f/kerl -k
@yongteak
yongteak / install-flutter-android-wsl.sh
Last active January 29, 2021 01:20 — forked from quierati/install-flutter-android-wsl.sh
Flutter+Android sdk tools Windows WSL using Ubuntu with
#!/bin/bash
# tech: windows10 wsl vscode ubuntu android-sdk-tools flutter dart
# update ubuntu
sudo apt-get update -y
sudo apt-get upgrade -y
# install requirements
sudo dpkg --add-architecture i386