Skip to content

Instantly share code, notes, and snippets.

View potados99's full-sized avatar
๐Ÿคช
์—ใ…Žํžˆใ…ฃใ…ฃํ›„์šฐํžˆ์šฐํžˆํžˆํžˆใ…ฃํ’‰ํ‚คใ…ฃใ…ฃ์ดํ›Ÿ

์†ก๋ณ‘์ค€ potados99

๐Ÿคช
์—ใ…Žํžˆใ…ฃใ…ฃํ›„์šฐํžˆ์šฐํžˆํžˆํžˆใ…ฃํ’‰ํ‚คใ…ฃใ…ฃ์ดํ›Ÿ
View GitHub Profile
create procedure sp_insert_something(in something varchar(255))
begin
-- ...์ƒ๋žต...
if something = 'hello' then
insert into things set body = something;
end if;
-- ...์ƒ๋žต...
end;
@potados99
potados99 / fuck-netfunnel.js
Last active June 20, 2022 02:02
NetFunnel ๋šซ์–ด๋ฒ„๋ฆฌ๊ธฐ
// Modify
(function () {
const originalFunction = window.originalFunction || NetFunnel_getTidChkEnter;
window.originalFunction = originalFunction;
NetFunnel_getTidChkEnter = function (options) {
if (options == null) {
console.error("์˜ต์…˜์ด ์—†์–ด??");
return originalFunction(...arguments);
}
@potados99
potados99 / combination.js
Created May 10, 2022 01:37
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋กœ ๋ฐฐ์—ด ์กฐํ•ฉ ๊ตฌํ•˜๊ธฐ
function combination(source, howMany = source.length) {
const result = [];
const sourceLength = source.length;
const pow = (workingCombo, currentIndex, remainingCount) => {
for (let i = currentIndex; i < sourceLength; i++) {
const nextWorkingCombo = [...workingCombo, source[i]];
if (remainingCount === 1) {
// ์ด๋ฒˆ ํ˜ธ์ถœ์€ ๋งˆ์ง€๋ง‰ ๋‹จ๊ณ„์ด๋‹ˆ,
@potados99
potados99 / poly.py
Last active June 17, 2021 13:48
How to deal with polynomials
def addPoly(a: list, b: list):
index_a = 0
index_b = 0
len_a = len(a)
len_b = len(b)
result = []
while True:
@potados99
potados99 / codepush-ram-bundle-ios.sh
Created May 31, 2021 04:48
Deploy unbundled output to Code Push
#!/bin/bash
mkdir ./CodePush
react-native ram-bundle --platform ios \
--entry-file index.js \
--bundle-output ./CodePush/main.jsbundle \
--assets-dest ./CodePush \
--indexed-ram-bundle \
--dev false
@potados99
potados99 / script.sh
Created April 3, 2021 10:26
Get path of current script
#!/bin/bash
DIR="$(dirname "$(realpath "$0")")"
@potados99
potados99 / realdir
Created April 3, 2021 10:20
Resolve real directory of the given path.
#!/bin/bash
echo "$(dirname "$(readlink -f "$1")")"
@potados99
potados99 / rename-branch.sh
Created March 21, 2021 18:19
๋ธŒ๋žœ์น˜ ์ด๋ฆ„ ๋ฐ”๊พธ๊ธฐ
git branch -m main master
git fetch origin
git branch -u origin/master master
@potados99
potados99 / .vimrc
Created March 6, 2021 13:03
Vim์—์„œ ์ŠคํŽ˜์ด์Šค 4์นธ์„ ํƒญ ๋ฌธ์ž๋กœ ์‚ฌ์šฉํ•˜๊ธฐ
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
@potados99
potados99 / main.c
Created March 5, 2021 19:08
C ๋ฌธ์ž์—ด ์ž๋ฅด๊ธฐ
/**
* ์ŠคํŠธ๋ง์„ delimiter๋กœ ์ž๋ฆ…๋‹ˆ๋‹ค.
* strtok์™€ ๋น„์Šทํ•˜๊ฒŒ ์›€์ง์ž…๋‹ˆ๋‹ค.
*
* @param source ์›๋ณธ ์ŠคํŠธ๋ง. ์›๋ณธ์— ์ˆ˜์ •์„ ๊ฐ€ํ•˜๋‹ˆ ์ฃผ์˜!
* @param delimiter ์ž๋ฅผ ๊ธฐ์ค€์ด ๋˜๋Š” ๋ฌธ์ž.
* @return ์ž˜๋ฆฐ ์กฐ๊ฐ ์ŠคํŠธ๋ง์˜ ์‹œ์ž‘ ์œ„์น˜.
*/
char *splitNext(char **source, char delimiter) {
if (!**source) {