yarn init
yarn add babel-cli babel-preset-latest
vi index.js
"scripts": {
"start": "babel-node --debug --presets latest -- index.js "
const test = () => new Promise((resolve, reject) => { | |
setTimeout(() => { | |
return resolve('hi') | |
}, 100) | |
}) | |
const doTest = async () => { | |
const ret = await test() | |
console.log(ret) | |
} |
yarn init
yarn add babel-cli babel-preset-latest
vi index.js
"scripts": {
"start": "babel-node --debug --presets latest -- index.js "
Displaying PCI bus devices and their information
lspci
lspci -v
https://devtalk.nvidia.com/default/topic/938988/-solved-cuda-8-0-on-ubuntu-16-04-gpu-not-available/
<?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> |
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
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.
# list | |
fdisk -l | |
pvs | |
pvdisplay | |
vgs | |
vgdisplay | |
lvs | |
lvdisplay | |
# create |
import http.server | |
import socketserver | |
socketserver.TCPServer(("", 1234), http.server.SimpleHTTPRequestHandler).serve_forever() |
(Tentative)
function removeVerticalTabs() {
var body = DocumentApp.getActiveDocument().getBody();
var bodyText = body.getText();
bodyText = bodyText.replace( /\r/g, "\n" );
body.setText( bodyText );
}
import signal | |
import threading | |
import traceback | |
import time | |
import sys | |
def func2(): | |
y = 2 | |
time.sleep(1) |