Skip to content

Instantly share code, notes, and snippets.

View potados99's full-sized avatar
🍟
뇸뇸

Potados potados99

🍟
뇸뇸
View GitHub Profile
@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) {
@potados99
potados99 / easy_pi.c
Last active January 24, 2021 19:12
Obfuscated pi.c explained
// See https://www.cise.ufl.edu/~manuel/obfuscate/pi.c
#include <stdio.h>
// Increase area for 1.
// If heading unary operator '-' does not exist, increase dia for 1.
#define _ (area++) < 0 ? 0 : dia++;
long area = 0;
long dia = 0;