Skip to content

Instantly share code, notes, and snippets.

View hotohoto's full-sized avatar
🐢
daily small stepping

Hoyeong-GenGenAI hotohoto

🐢
daily small stepping
  • GenGenAI
  • Seoul, Korea
View GitHub Profile
@hotohoto
hotohoto / simpleAsyncAwait.js
Last active January 20, 2017 16:21
A simple async await example
const test = () => new Promise((resolve, reject) => {
setTimeout(() => {
return resolve('hi')
}, 100)
})
const doTest = async () => {
const ret = await test()
console.log(ret)
}
@hotohoto
hotohoto / simple_nodejs.md
Last active July 26, 2017 02:27
Make a simple nodejs project base with babel-preset-latest
yarn init
yarn add babel-cli babel-preset-latest
vi index.js
"scripts": {
 "start": "babel-node --debug --presets latest -- index.js "
@hotohoto
hotohoto / nvidia_graphics_card_on_linux.md
Created February 14, 2017 21:42
nvidia graphics card on linux
@hotohoto
hotohoto / iterm2colorset.itermcolors
Created August 7, 2017 09:47
atom like iterm2 colorset
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
@hotohoto
hotohoto / nodejs_systemctl.md
Created August 23, 2017 05:27
Run Node.js web server via systemctl

Make a configuration file like below at /etc/systemd/system/nodejs_www.service.

[Unit]
Description=My Node.js Web Server

[Service]
ExecStart=/usr/bin/yarn start

WorkingDirectory=/home/hotohoto/app
@hotohoto
hotohoto / python3_venv.md
Last active August 30, 2017 09:00
Setting up python3 virtual environment

Somehow Install python3. (I'm not sure. Needs to be updated later. This is for macOS.)

brew install python3

Install venv module first to create virtual environment.

pip3 install venv

Make initial virtual environment files.

@hotohoto
hotohoto / example.sh
Created July 19, 2018 04:30
Storage management with volumes in linux
# list
fdisk -l
pvs
pvdisplay
vgs
vgdisplay
lvs
lvdisplay
# create
@hotohoto
hotohoto / http.py
Last active August 7, 2018 07:19
Run simple http server using python
import http.server
import socketserver
socketserver.TCPServer(("", 1234), http.server.SimpleHTTPRequestHandler).serve_forever()
@hotohoto
hotohoto / script.md
Created November 24, 2018 05:26
script to remove vertical tabs (linebreak in a paragraph) in google docs

(Tentative)

function removeVerticalTabs() {
  var body = DocumentApp.getActiveDocument().getBody();
  var bodyText = body.getText();
  bodyText = bodyText.replace( /\r/g, "\n" );
  body.setText( bodyText );
}
@hotohoto
hotohoto / example.py
Created October 7, 2020 04:45
Python stack dumper
import signal
import threading
import traceback
import time
import sys
def func2():
y = 2
time.sleep(1)