Skip to content

Instantly share code, notes, and snippets.

View potados99's full-sized avatar
πŸ€ͺ
μ—γ…Žνžˆγ…£γ…£ν›„μš°νžˆμš°νžˆνžˆνžˆγ…£ν’‰ν‚€γ…£γ…£μ΄ν›Ÿ

솑병쀀 potados99

πŸ€ͺ
μ—γ…Žνžˆγ…£γ…£ν›„μš°νžˆμš°νžˆνžˆνžˆγ…£ν’‰ν‚€γ…£γ…£μ΄ν›Ÿ
View GitHub Profile
@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;
@potados99
potados99 / install-npm-module-globally
Last active December 3, 2020 09:09
npm μ „μ—­ λͺ¨λ“ˆ μ„€μΉ˜ν•˜κΈ°
sudo npm install -g --unsafe-perm [module]

λ°±μ—…

$ mysqldump -u [μ‚¬μš©μž 계정] -p [νŒ¨μŠ€μ›Œλ“œ] --no-tablespaces --column-statistics=0 [원본 λ°μ΄ν„°λ² μ΄μŠ€λͺ…] > [생성할 λ°±μ—… DBλͺ…].sql
$ mysqldump -u potados -p 1234 --no-tablespaces --column-statistics=0 cafeteria > backedup.sql

mysqldump 8λΆ€ν„° --no-tablespaces --column-statistics=0 μ˜΅μ…˜μ„ μ£Όμ–΄μ•Ό 함.

볡원

$ mysql -u [μ‚¬μš©μž 계정] -p [νŒ¨μŠ€μ›Œλ“œ] [볡원할 DB] &lt; [λ°±μ—…λœ DB].sql
@potados99
potados99 / commit-n-days-before.sh
Last active June 30, 2020 14:44
Create a commit at N days before
#!/bin/zsh
# Commit N days before
# At least one arg needed.
if [ $# -lt 1 ]; then
echo "Usage: ./commit-n-days-before [N]"
exit 1
fi
@potados99
potados99 / disable-autolinking.md
Created June 30, 2020 12:06 — forked from alexpeattie/disable-autolinking.md
Disable Github-flavored Markdown autolinking

http://example.com

http://example.com

@potados99
potados99 / node-and-es6.md
Created March 5, 2020 17:10
Node.js v12 + ECMA Module

Enable ES module support

Built-in way

Use --experimental-modules.

For example:

node --experimental-modules index.js
@potados99
potados99 / jekyll-code-block-escape.md
Last active July 9, 2019 20:02
Escape {% in Jekyll code block

Place {% raw %} and {% endraw %} pair.

{% raw $}
```
{{% site.data...blah %}}
```
{% endraw %}
@potados99
potados99 / resize.sh
Created June 30, 2019 08:57
Setting prompt size
#!/bin/sh
stty cols 200 rows 50
@potados99
potados99 / gist-instruction.md
Last active June 29, 2019 17:01
How to use Gist