Skip to content

Instantly share code, notes, and snippets.

@egoing
egoing / docker-aliases.sh
Last active September 12, 2021 15:00 — forked from jgrodziski/docker-aliases.sh
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@egoing
egoing / README.md
Last active August 20, 2021 04:44
Danfo.js 수업

Danfo.js 란?

표로 된 데이터를 분석하고 가공하기 위한 JavaScript 라이브러리 입니다.

설치

<script src="https://cdn.jsdelivr.net/npm/danfojs@0.2.7/lib/bundle.min.js"></script>

기본 개념

Danfo.js는 두가지 데이터 형식을 가지고 있습니다.

  • Seriese : 1차원 배열
@egoing
egoing / README.md
Last active November 17, 2021 07:26
AWS AutoScaling 예제

바로오기

http://bit.ly/AWS-AS

apache, php 설치

sudo apt update; 
sudo apt install apache2 php; 
sudo service apache2 restart; 
@egoing
egoing / README.md
Last active February 26, 2021 05:49
React tutorial

step0

목표

리액트의 개발환경을 구축하고 싶다.

힌트

  1. nodejs 설치
  2. npm i create-react-app
  3. create-react-app myapp
  4. cd myapp
<?php
$start = microtime(true);
$options = [ 'cost' => $_GET['cost'] ];
$hash = password_hash('hi', PASSWORD_DEFAULT, $options);
$ip = $_SERVER['REMOTE_ADDR'];
echo $ip.' => '.$hash.' : '.(microtime(true)-$start);
?>
@egoing
egoing / complete.html
Last active December 28, 2020 01:40
danfo.js example - http://bit.ly/danfojs
<!doctype html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.1.2/dist/index.min.js"></script>
</head>
<body>
<div id="s_table"></div>
<div id="s_line"></div>
<div id="d_table"></div>
@egoing
egoing / linux(ubuntu)에서 nodejs server 실행하기.md
Last active January 8, 2021 16:23
linux(ubuntu)에서 nodejs server 실행하기

linux에서 nodejs를 80번 포트에서 실행

80번 포트는 root 권한으로만 실행이 가능하기 때문에 보안적으로 좋은 방법은 아닙니다.

sudo apt update;
sudo apt install -y nodejs npm; 
echo "var http = require('http');
var app = http.createServer(function(req, res){
	res.end('hi');
});
app.listen(80);" > index.js;
@egoing
egoing / README.md
Last active November 23, 2020 10:00
AWS API Gateway - Lambda 예제
@egoing
egoing / position-lab.html
Last active October 22, 2020 01:16
css position 강의 예제
<!-- 실험실 -->
<html>
<head>
<style>
body {
margin: 0;
}
div {
@egoing
egoing / git-fake-commit.md
Last active December 3, 2019 15:20
git cli에서 샘플 커밋을 만드는 간단한 배쉬 스크립트

git 을 공부하다보면 테스트를 해야 할 때가 많습니다. 커밋을 많이 만들어야 하는데요. 이게 참 귀찮은 일이에요. 그래서 쉘스크립트로 커밋을 자동으로 만들어주는 코드를 간단히 만들어봤습니다. (쉘스크립트는 잘 몰라서 능력자 분들이 더 좋은 코드로 발전시켜주시면 잘 쓰겠습니다. ㅎㅎ)

step1

실행할 때마다 git_ac라는 변수의 값을 1씩 증가 시켜줍니다.
if [ -v git_ac ]; then git_ac=$(($git_ac+1)); else git_ac=1; fi;

step2

step2+ work.txt 파일의 끝에 git_ac의 값을 추가합니다. 교체하고 싶으면 >>를 >로 변경하면 됩니다.
if [ -v git_ac ]; then git_ac=$(($git_ac+1)); else git_ac=1; fi; echo $git_ac >> work.txt