This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main: | |
print("hello happy world!!!") | |
if __name__ == "__main__": | |
main(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hello World! | |
class HelloTrema < Trema::Controller | |
def start(_args) | |
logger.info 'Trema started.' | |
end | |
def switch_ready(datapath_id) | |
logger.info "Hello #{datapath_id.to_hex}!" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:コミットID/server-linux-x64/stable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(client端末にcurlがインストールされている場合) | |
置換元 | |
CURL_OUTPUT=$(curl --connect-timeout 7 -L $DOWNLOAD_URL --output vscode-server.tar.gz -w "%{http_code}")\n\t\t\tif [[ ($? != 0) || ($CURL_OUTPUT != 2??) ]] | |
置換後 | |
cp <ダウンロードしたファイル> vscode-server.tar.gz\n\t\t\tif [[ ($? != 0) ]] | |
(client端末にcurlがインストールされていない場合) | |
置換元 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// IntelliSense を使用して利用可能な属性を学べます。 | |
// 既存の属性の説明をホバーして表示します。 | |
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(gdb) Launch", | |
"type": "cppdbg", | |
"request": "launch", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "g++ build active file", | |
"type": "shell", | |
"command": "g++", | |
"args": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OBJS = sample | |
CXX = g++ | |
CXXFLAGS = -std=c++11 -Wall -O2 | |
LDFLAGS = -lboost_thread | |
RM = rm -rf | |
all: $(OBJS) | |
clean: | |
$(RM) $(OBJS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/thread.hpp> | |
#define LOOP_NUM 5 | |
// hogehogeと標準出力する関数 | |
void Hoge() { | |
for(int i = 0; i != LOOP_NUM; i++) { | |
// hogehogeと標準出力(標準出力はスレッドセーフじゃないから本当は排他制御が必要だけど今回は省略) | |
std::cout << "hogehoge" << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/thread.hpp> | |
#define LOOP_NUM 5 | |
// 引数の文字列を標準出力する関数 | |
void Print(std::string str) { | |
for(int i = 0; i != LOOP_NUM; i++) { | |
// strの内容を標準出力(標準出力はスレッドセーフじゃないから本当は排他制御が必要だけど今回は省略) | |
std::cout << str << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/thread.hpp> | |
#define LOOP_NUM 5 | |
// 文字列を加工して返す関数 | |
std::string Modify(std::string str) { | |
std::cout << str << std::endl; | |
return str + " is modified."; |