Skip to content

Instantly share code, notes, and snippets.

View bbonkr's full-sized avatar
πŸ’»
Keep going πŸš€

Pon Cheol, Ku (ꡬ본철) bbonkr

πŸ’»
Keep going πŸš€
View GitHub Profile
@bbonkr
bbonkr / PredicateOrGroupBuilder.cs
Last active June 19, 2025 04:47
Combine `or` predicates.
public class PredicateOrGroupBuilder<T>
{
private readonly List<Expression<Func<T, bool>>> predicates;
public PredicateOrGroupBuilder()
{
predicates = new();
}
public PredicateOrGroupBuilder<T> AddPredicate(Expression<Func<T, bool>> predicate)
@bbonkr
bbonkr / Program.cs
Created August 11, 2023 03:24
Console app
/*
Add below packages
- Microsoft.Extensions.Hosting
- Microsoft.Extensions.Configuration.Binder
- Microsoft.Extensions.Configuration.Json
- Microsoft.Extensions.DependencyInjection
```shell
$ dotnet add package Microsoft.Extensions.Hosting
@bbonkr
bbonkr / StorageHelper.ts
Created April 11, 2023 07:00
StorageHelper; use storage safely
abstract class WindowStorageHelper {
constructor(storage: Storage){
this.storage = storage;
}
public get<T>(key: string): T | undefined | null {
if(this.guardWindowSafe()){
const item=this.storage.getItem(key);
if(item){
return JSON.parse(item) as T;

λŒ€ν•™κ΅ μ „μžμš°νŽΈμ£Όμ†Œκ°€ 있으면 μ‚¬μš©λ£Œ 할인 λ˜λŠ” 무료둜 μ‚¬μš©ν•  수 μžˆλŠ” μ„œλΉ„μŠ€

ν•™κ΅μ—μ„œ λ„μž…ν•΄μ„œ μš΄μ˜μ€‘μΈμ§€ 확인이 ν•„μš”ν•©λ‹ˆλ‹€.

  1. Google G Suite for Education
  2. Office 365 Education

μ „μžμš°νŽΈμ£Όμ†Œλ§Œ 있으면 ν™œμš©μ΄ κ°€λŠ₯ν•©λ‹ˆλ‹€.

Query to list up for avd. μ•ˆλ“œλ‘œμ΄λ“œ 가상 μž₯치 λͺ©λ‘μ„ μ‘°νšŒν•©λ‹ˆλ‹€.

$ emulator -list-avd
Android_Accelerated_Oreo
Nexus_5X_API_29_x86

execute a wanted avd.

@bbonkr
bbonkr / _Webpack-Fontawesome-Bootstrap-Phoenix.md
Created June 2, 2019 12:50 — forked from nicbet/_Webpack-Fontawesome-Bootstrap-Phoenix.md
Sass versions of Bootstrap 4 and Fontawesome 5 with Elixir / Phoenix Framework 1.3.x and 1.4.x using Webpack

SASS Versions of

  • Fontawesome 5
  • Bootstrap 4

in Phoenix 1.3 and 1.4 via Webpack

@bbonkr
bbonkr / RetryHandler.cs
Created January 14, 2019 01:54
HttpClient retry sample
public class RetryHandler : DelegatingHandler
{
// Strongly consider limiting the number of retries - "retry forever" is
// probably not the most user friendly way you could respond to "the
// network cable got pulled out."
private const int MaxRetries = 3;
public RetryHandler(HttpMessageHandler innerHandler)
: base(innerHandler)
{ }
@bbonkr
bbonkr / .gitconfig
Created January 8, 2019 11:25
.gitconfig 별칭 예제
[alias]
co = checkout
rb = rebase -i
st = status
cm = commit
pl = pull
ps = push
lg = log --graph --abbrev-commit --decorate --format=format:'%C(cyan)%h%C(reset) - %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(yellow)%d%C(reset)' --all
ad = add
tg = tag -n
class ApplicationException {
message: string;
constructor(message?: string) {
this.message = message || 'μ²˜λ¦¬λ˜μ§€ μ•Šμ€ μ˜ˆμ™Έκ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.';
}
}
@bbonkr
bbonkr / tsconfig.json
Created October 22, 2018 02:05
typescript + react.js
{
"compilerOptions": {
/* Basic Options */
"target": "es5",
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "none",
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */