Skip to content

Instantly share code, notes, and snippets.

View soonoo's full-sized avatar

soonoo soonoo

  • Seoul, Korea
  • 15:50 (UTC +09:00)
View GitHub Profile
@soonoo
soonoo / Dockerfile
Created January 28, 2023 07:02
Dockerfile for running rqlite in ARM
FROM ubuntu:22.04
ENV RQLITE_VERSION=7.13.1
RUN apt update && \
apt install -y curl && \
curl -L https://github.com/rqlite/rqlite/releases/download/v${RQLITE_VERSION}/rqlite-v${RQLITE_VERSION}-linux-arm64.tar.gz -o rqlite-v${RQLITE_VERSION}-linux-arm64.tar.gz && \
tar xvfz rqlite-v${RQLITE_VERSION}-linux-arm64.tar.gz && \
cp rqlite-v${RQLITE_VERSION}-linux-arm64/rqlited /bin && \
cp rqlite-v${RQLITE_VERSION}-linux-arm64/rqlite /bin && \
rm -fr rqlite-v${RQLITE_VERSION}-linux-arm64 rqlite-v${RQLITE_VERSION}-linux-arm64.tar.gz && \
@soonoo
soonoo / watch.sh
Created March 27, 2020 17:24
watch file changes and rerun command
fswatch -e ".*" -i "\\.go$" . | xargs -n1 sh -c "(pkill command; command) &"
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 37046ac..254cf7e 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -567,8 +567,10 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
blk_execute_rq(req->q, NULL, req, at_head);
if (result)
*result = nvme_req(req)->result;
- if (nvme_req(req)->flags & NVME_REQ_CANCELLED)
+ if (nvme_req(req)->flags & NVME_REQ_CANCELLED) {
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 37046ac..254cf7e 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -567,8 +567,10 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
blk_execute_rq(req->q, NULL, req, at_head);
if (result)
*result = nvme_req(req)->result;
- if (nvme_req(req)->flags & NVME_REQ_CANCELLED)
+ if (nvme_req(req)->flags & NVME_REQ_CANCELLED) {
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 37046ac..bb42fcb 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -567,8 +567,10 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
blk_execute_rq(req->q, NULL, req, at_head);
if (result)
*result = nvme_req(req)->result;
- if (nvme_req(req)->flags & NVME_REQ_CANCELLED)
+ if (nvme_req(req)->flags & NVME_REQ_CANCELLED) {
function solution(arr1, arr2) {
// 각각 오름차순, 내림차순으로 정렬후 계산
arr1.sort((a, b) => {
return a - b;
});
arr2.sort((a, b) => {
return b - a;
});
@soonoo
soonoo / math#2.js
Last active May 15, 2018 05:02
math #2
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
// 입력 포맷 잘못되면 에러
rl.question('숫자를 입력해 주세요(공백 한칸으로 구분해주세요): ', (numList) => {
rl.question('다음으로 나눠지는지 확인해 주세요: ', (checkNum) => {