Skip to content

Instantly share code, notes, and snippets.

View hongry18's full-sized avatar

hongry hongry18

View GitHub Profile
@hongry18
hongry18 / aes_encrypt.php
Created April 5, 2016 05:21 — forked from kijin/aes_encrypt.php
PHP에서 AES-256과 HMAC을 사용하여 문자열을 암호화하고 위변조를 방지하는 법
<?php
// AES-256과 HMAC을 사용하여 문자열을 암호화하고 위변조를 방지하는 법.
// 비밀번호는 서버만 알고 있어야 한다. 절대 클라이언트에게 전송해서는 안된다.
// PHP 5.2 이상, mcrypt 모듈이 필요하다.
// 문자열을 암호화한다.
function aes_encrypt($plaintext, $password)
{
@hongry18
hongry18 / aes_cipher.py
Created September 28, 2016 06:19 — forked from pankaj28843/aes_cipher.py
Encrypt & Decrypt using PyCrypto AES 256
'''
Based on Stackoverflow Answer: http://stackoverflow.com/a/12525165/353550
'''
import base64
from Crypto.Cipher import AES
from Crypto import Random
BS = 16
@hongry18
hongry18 / websocketserver.py
Created January 8, 2018 05:21 — forked from qirt/websocketserver.py
Simple WebSockets RFC 6455 in Python
import array
import time
import socket
import hashlib
import sys
from select import select
import re
import logging
from threading import Thread
import signal
@hongry18
hongry18 / epoll.go
Created January 26, 2018 09:50 — forked from tevino/epoll.go
Golang example for using epoll
package main
import (
"fmt"
"net"
"os"
"syscall"
)
const (
@hongry18
hongry18 / nginx.conf
Created February 8, 2018 04:24 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@hongry18
hongry18 / curl.md
Created July 6, 2018 13:48 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

텐서플로우 시작하기

글쓴이: 김정주(haje01@gmail.com)

이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.


소개

텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.

@hongry18
hongry18 / README.md
Created April 5, 2019 07:06 — forked from vitkin/README.md
Backport WebSocket to Apache 2.2 that doesn't modify the 'mod_utils.c' and the 'mod_proxy.h'. See the 'README.md' for details and instructions.

Backport WebSocket to Apache 2.2

This is my variation from the original patch and that also includes the suggested correction for the bug with secure websocket 'wss://'.

The difference is that I avoid modifying the mod_utils.c and the mod_proxy.h so that if the mod_proxy module has been embedded in the main httpd binary then it will work and you won't get the

@hongry18
hongry18 / cmake-tutorial.md
Created May 28, 2019 05:21 — forked from luncliff/cmake-tutorial.md
CMake 할때 쪼오오금 도움이 되는 문서

주의

  • 이 문서는 CMake를 주관적으로 서술합니다
  • 이 문서를 통해 CMake를 시작하기엔 적합하지 않습니다
    https://cgold.readthedocs.io/en/latest/ 3.1 챕터까지 따라해본 이후 기본사항들을 속성으로 익히는 것을 돕기위한 보조자료로써 작성되었습니다

참고자료

@hongry18
hongry18 / compile_php_5.2.17_Ubuntu_14.04.sh
Created June 11, 2020 00:47 — forked from deanet/compile_php_5.2.17_Ubuntu_14.04.sh
Install NGINX AND PHP 5.2.17 WITH PATCH FPM 0.5.14
apt-get update
apt-get install -y gcc make build-essential \
libxml2-dev libcurl4-openssl-dev libpcre3-dev libbz2-dev libjpeg-dev \
libpng12-dev libfreetype6-dev libt1-dev libmcrypt-dev libmhash-dev \
freetds-dev libmysqlclient-dev unixodbc-dev \
libxslt1-dev
mkdir -pv /usr/include/freetype2/freetype
ln -sf /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h
wget -c -t 3 -O ./php-5.2.17.tar.gz http://museum.php.net/php5/php-5.2.17.tar.gz