This file contains 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
# -*- coding: utf-8 -*- | |
import paramiko | |
PRIVATE_KEY = paramiko.RSAKey.from_private_key_file(filename=FILENAME) | |
client = paramiko.SSHClient() | |
client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
client.connect(hostname=HOSTNAME, username=USERNAME, pkey=PRIVATE_KEY) |
This file contains 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
# DockerHub 로그인 | |
docker login --username {Dockerhub Username} --password {DockerHub Access token} | |
(= docker login -u {Dockerhub Username} -p {DockerHub Access token}) | |
# 컨테이너를 이미지화 해서 DockerHub에 커밋 | |
docker commit {Container Name} {DockerHub Username}/{Image Name}:{Tag (e.g., latest)} | |
# DockerHub에 이미지 푸시 | |
docker push {DockerHub Username}/{Image Name}:{Tag (e.g., latest)} |
This file contains 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
from multiprocessing import Process | |
import time | |
import sys | |
TIMEOUT = 5 | |
def tenSecond(): | |
for i in range(10): |
This file contains 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
package main | |
import ( | |
"encoding/csv" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"strconv" | |
"strings" |
This file contains 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
package main | |
import ( | |
"time" | |
"github.com/gliderlabs/ssh" | |
) | |
func main() { | |
MaxTimeout := time.Second * 20 |
This file contains 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 MY_VARIABLE = null | |
if(env.my_parameter) { | |
MY_VARIABLE = env.my_parameter | |
} else { | |
MY_VARIABLE = "default value" | |
} | |
echo "parameter set: ${MY_VARIABLE}" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net" | |
"time" | |
"golang.org/x/crypto/ssh" |
This file contains 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
git branch --delete(-D) [branch name] | |
git push origin :[branch name] |
This file contains 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
> git reset HEAD^ | |
More? ^ | |
> git push --force |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
// Integer data define | |
typedef struct Data Data; | |
struct Data { | |
int num; | |
}; | |
// Integer data control functions |
OlderNewer