Skip to content

Instantly share code, notes, and snippets.

OBJS = sample
CXX = g++
CXXFLAGS = -std=c++11 -Wall -O2
LDFLAGS = -lboost_thread
RM = rm -rf
all: $(OBJS)
clean:
$(RM) $(OBJS)
{
// 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": [
{
// IntelliSense を使用して利用可能な属性を学べます。
// 既存の属性の説明をホバーして表示します。
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
(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がインストールされていない場合)
置換元
wget -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:コミットID/server-linux-x64/stable
# 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
def main:
print("hello happy world!!!")
if __name__ == "__main__":
main():
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/socket.h>