Skip to content

Instantly share code, notes, and snippets.

View dktsudgg's full-sized avatar
๐ŸŽฏ
Focusing

dktsudgg dktsudgg

๐ŸŽฏ
Focusing
  • South Korea
  • 16:20 (UTC +09:00)
View GitHub Profile
@karpolan
karpolan / .prettierrc.js
Last active April 5, 2025 14:30
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 ([email protected])
* Contributors:Francesco Verheye ([email protected])
* Israel Dominguez ([email protected])
*/
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
}
############################