Skip to content

Instantly share code, notes, and snippets.

@Hyunho
Hyunho / markdown.md
Created May 13, 2020 05:10
markdown test

What You Will Learn

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment. By default, containers isolate applications from one another and the underlying infrastructure, while providing an added layer of protection for the application.

@Hyunho
Hyunho / cross-browser-qrcode.markdown
Created February 12, 2019 09:06
Cross-browser QRCode
@Hyunho
Hyunho / 0_reuse_code.js
Created December 15, 2013 09:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Hyunho
Hyunho / concurrently.sh
Created December 15, 2013 09:00
prevent that two same scripts run concurrently
#!/bin/sh
PIDFILE=/tmp/update_index.pid
if [ -e $PIDFILE ]
then
PID=$(cat $PIDFILE)
PSCNT=$(ps -p $PID | grep -v CMD | wc -l)
@Hyunho
Hyunho / requests.py
Created December 11, 2013 06:13
clone
"""
This is clone of requests python package
if server is inconvenience to install python package, I want to use this
"""
import urllib2
import urllib
@Hyunho
Hyunho / gdb.md
Created November 13, 2015 04:37
gdb commands

watchpoint 설정

  • watah [변수명] : 변수의 값이 써질때 브레이크가 걸린다.
  • rwatch [변수명] : 변수의 값이 읽혀질 때 브레이크가 걸린다.
  • awatch [변수명] : 변수의 값이 읽혀지거나 쓰이는 모든 경우에 대해 브레이크가 걸린다.
@Hyunho
Hyunho / example.sh
Created November 6, 2015 19:17
cpio example
echo "DJMP1/mmdb/telcobase_scripts/backupDB" | cpio -pdm upsf_config/
@Hyunho
Hyunho / firewalld_direct_message.sh
Last active October 29, 2015 08:43
iptables_rule(only allow ssh connection)
# using firewalld utility
firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter OUTPUT 0 -p tcp -m tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter OUTPUT 1 -p tcp -m multiport --dports 200:65535 -j DROP