Skip to content

Instantly share code, notes, and snippets.

View bc-lee's full-sized avatar

Byoungchan Lee bc-lee

  • Hyperconnect. LLC.
  • Seoul, Korea
  • 08:38 (UTC +09:00)
View GitHub Profile
@bc-lee
bc-lee / print_python_package.py
Created May 9, 2021 04:58
print_python_package.py
#!/usr/bin/env python3
# inspired from https://stackoverflow.com/a/53805392
import pkg_resources
try:
from pip import get_installed_distributions
except:
from pip._internal.utils.misc import get_installed_distributions
@bc-lee
bc-lee / .sh
Created September 27, 2020 01:15
One liners
# Perl one liner which convert CRLF to LF
perl -i -pe 's#\r\n$#\n#g'
@bc-lee
bc-lee / test.dart
Last active December 10, 2019 04:56
Dart JSON Parse error
import "dart:convert";
main() {
var input = ["{\"key\":\"value0\"}{\"key\":\"value1\"}"];
Stream.fromIterable(input)
.transform(JsonDecoder())
.listen((item) {
print("item: $item\n");
});
}
@bc-lee
bc-lee / setup_conan.sh
Created November 26, 2017 05:42
setup_conan.sh
#!/bin/bash
function die {
echo "$*" 1>&2 ;
exit 1;
}
CC=${CC:-/usr/bin/gcc}
CXX=${CXX:-/usr/bin/g++}
@bc-lee
bc-lee / download.cmake
Created June 10, 2017 12:21
download.cmake
if(NOT(DEST))
message(FATAL_ERROR "DEST NOT DEFINED")
endif()
if(SHA1)
string(TOLOWER ${SHA1} SHA1)
endif()
if(EXISTS "${DEST}")
if(NOT(SHA1))