Skip to content

Instantly share code, notes, and snippets.

View code-machina's full-sized avatar
😌
Humble

GB Kim code-machina

😌
Humble
View GitHub Profile
@code-machina
code-machina / handson-docker-swarm.sh
Created November 22, 2018 06:54
Hands-on : Docker swarm
# 아래의 링크를 참조하여 간단히 작성한다.
# https://subicura.com/2017/02/25/container-orchestration-with-docker-swarm.html
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@code-machina
code-machina / tor_sock_curl.sh
Created November 27, 2018 04:46
Http Request Using Tor socket
for ((c=1; c<=200; c++)) do
HTTP_URL
curl -s --socks5-hostname 127.0.0.1:9050 '$HTTP_URL' -o /dev/null -w "\nStatus: %{http_code}\n" &
# curl --socks5-hostname 127.0.0.1:9050 'https://api.ipify.org?format=json'&
# echo "\n" >> test.out
done
@code-machina
code-machina / index.html
Created November 28, 2018 22:45
React Tutorial
<div id="root" />
@code-machina
code-machina / ubuntu-geth-install.sh
Last active December 9, 2018 05:37
Install Geth in Ubuntu 16.04
# Install golang
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-go
# check golang version
go version
# Install Ethereum
@code-machina
code-machina / genesis.json
Created December 9, 2018 09:01
Genesis.json to create genesis block in ethereum test-net
{
"config": {
"chainId": 33,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000033",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
@code-machina
code-machina / wget-genesis.sh
Created December 9, 2018 09:06
Download genesis.json from gist
wget https://gist.githubusercontent.com/code-machina/2ccfe2843bb8777394f7adf6bb8707d8/raw/1bd98178b34f02aa1d00b9e0c5a0821c3ac60ff6/genesis.json
@code-machina
code-machina / index.vue
Last active December 11, 2018 23:09
[nuxt] Links and Navigating Around : nuxt-link
<!-- nuxt-link 를 사용하여 Navigate 와 Link 를 다룰 수 있음
to attribute : navigate 경로를 지정-->
<template>
<section class="container">
<nuxt-link to="/users">Users</nuxt-link>
</section>
</template>
<script>
import Logo from '~/components/Logo.vue'
@code-machina
code-machina / ISP.cs
Created December 15, 2018 01:05
Interface Segregation Principle (ISP) PoC
using System;
namespace DotNetDesignPatternDemos.SOLID.InterfaceSegregationPrinciple
{
public class Document
{
}
public interface IMachine
{
@code-machina
code-machina / curl_check_eth_mining.sh
Created December 16, 2018 23:34
Ethereum JSON-RPC 명령어 모음 (geth, ethereum, json-rpc)
# ethereum 마이닝이 진행 중인지 확인한다.
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"eth_mining","params":[], "id":10}' ${RPC_HOST}:8545
# output: {"jsonrpc":"2.0","id":10,"result":true}