Skip to content

Instantly share code, notes, and snippets.

View dktsudgg's full-sized avatar
🎯
Focusing

dktsudgg dktsudgg

🎯
Focusing
  • South Korea
  • 18:57 (UTC +09:00)
View GitHub Profile
@karpolan
karpolan / .prettierrc.js
Last active July 5, 2024 06:08
Prettier config for React App
module.exports = {
printWidth: 120, // max 120 chars in line, code is easy to read
useTabs: false, // use spaces instead of tabs
tabWidth: 2, // "visual width" of of the "tab"
trailingComma: 'es5', // add trailing commas in objects, arrays, etc.
semi: true, // add ; when needed
singleQuote: true, // '' for stings instead of ""
bracketSpacing: true, // import { some } ... instead of import {some} ...
arrowParens: 'always', // braces even for single param in arrow functions (a) => { }
jsxSingleQuote: false, // "" for react props, like in html
@GabrielCzar
GabrielCzar / DOCKER_COMPOSE.md
Last active March 16, 2024 21:42
Docker compose samples

Scripts to run specific services

@myshov
myshov / parsing.lhs
Created January 31, 2016 17:29
Functional parsing library from chapter 8 of Programming in Haskell for new versions of GHCI
Functional parsing library from chapter 8 of Programming in Haskell,
Graham Hutton, Cambridge University Press, 2007.
> module Parsing where
>
>
> import Data.Char
> import Control.Monad
> import qualified Control.Applicative as CA
@irazasyed
irazasyed / manage-etc-hosts.sh
Created March 7, 2015 09:16
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/bin/sh
# PATH TO YOUR HOSTS FILE
ETC_HOSTS=/etc/hosts
# DEFAULT IP FOR HOSTNAME
IP="127.0.0.1"
# Hostname to add/remove.
HOSTNAME=$1
@felHR85
felHR85 / SoftKeyboard.java
Last active February 17, 2024 23:11
A solution to catch show/hide soft keyboard events in Android http://felhr85.net/2014/05/04/catch-soft-keyboard-showhidden-events-in-android/
/*
* Author: Felipe Herranz (felhr85@gmail.com)
* Contributors:Francesco Verheye (verheye.francesco@gmail.com)
* Israel Dominguez (dominguez.israel@gmail.com)
*/
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.os.Handler;
@kijin
kijin / rsa_encrypt.php
Created January 23, 2014 04:55
PHP에서 RSA 개인키/공개키 조합을 사용하여 서버에 비밀번호를 저장할 필요 없이 문자열을 암호화하는 법
<?php
// 비대칭 알고리듬인 RSA를 사용하여 문자열을 암호화하는 법.
// 개인키 비밀번호는 암호화할 때는 필요없고 복호화할 때만 입력하면 되므로
// 서버에 저장할 필요 없이 그때그때 관리자가 입력하도록 해도 된다.
// PHP 5.2 이상, openssl 모듈이 필요하다.
// RSA 개인키, 공개키 조합을 생성한다.
// 키 생성에는 시간이 많이 걸리므로, 한 번만 생성하여 저장해 두고 사용하면 된다.
// 단, 비밀번호는 개인키를 사용할 때마다 필요하다.
@kongchen
kongchen / setprop.sh
Last active January 3, 2023 09:29
set properties file value by key via bash shell
#!/bin/bash
############################
#script function
############################
setProperty(){
awk -v pat="^$1=" -v value="$1=$2" '{ if ($0 ~ pat) print value; else print $0; }' $3 > $3.tmp
mv $3.tmp $3
}
############################