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
#!/bin/bash | |
rm -rf /home/yen3/ubuntu.qcow2 | |
qemu-img create -f qcow2 /home/yen3/ubuntu.qcow2 10G | |
virsh undefine ubuntu1604arm64 --nvram | |
install_from_localtion() { | |
virt-install -n ubuntu1604arm64 --memory 1024 --arch aarch64 --vcpus 1 \ | |
--disk /home/yen3/ubuntu.qcow2,device=disk,bus=virtio \ |
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
#!/usr/bin/env bash | |
# ref: https://forums.docker.com/t/communicate-with-dbus-from-an-unprivileged-container/101549 | |
# ref: https://stackoverflow.com/questions/23601844/how-to-create-user-in-linux-by-providing-uid-and-gid-options | |
# ref: https://github.com/mviereck/x11docker/wiki/How-to-connect-container-to-DBus-from-host | |
set -euxo pipefail | |
readonly DBUS_USER_SESSION_PATH="${DBUS_SESSION_BUS_ADDRESS#"unix:path="}" |
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
https://gitlab.example.com { | |
proxy / https://localhost:10443 { | |
insecure_skip_verify | |
transparent | |
} | |
tls { | |
dns gandiv5 | |
} | |
} |
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
{-# LANGUAGE BangPatterns #-} | |
-- Compile command: ghc -O2 Mandelbrot.hs -rtsopts -threaded -fllvm | |
import qualified Control.Monad.Par as Par | |
import Control.Parallel.Strategies (parList, rseq, using) | |
import Data.Binary.IEEE754 (putFloat64le) | |
import Data.Binary.Put | |
import qualified Data.ByteString.Lazy as BL | |
import Data.Time.Clock (diffUTCTime, getCurrentTime) |
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
sync |
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
" With this function you can reuse the same terminal in neovim. | |
" You can toggle the terminal and also send a command to the same terminal. | |
let s:monkey_terminal_window = -1 | |
let s:monkey_terminal_buffer = -1 | |
let s:monkey_terminal_job_id = -1 | |
function! MonkeyTerminalOpen() | |
" Check if buffer exists, if not create a window and a buffer | |
if !bufexists(s:monkey_terminal_buffer) |
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
#!/bin/bash | |
set -ex | |
PREFIX=$HOME/usr/tools/llvm | |
LLVM_VERSION=7.0.0 | |
BASE_URL=https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION} | |
COMPOMENT=(llvm cfe compiler-rt libcxx libcxxabi openmp clang-tools-extra polly libunwind) |
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
diff --git a/src/console/dlt-control-common.c b/src/console/dlt-control-common.c | |
index 3973059..84d441c 100644 | |
--- a/src/console/dlt-control-common.c | |
+++ b/src/console/dlt-control-common.c | |
@@ -210,7 +210,7 @@ int dlt_parse_config_param(char *config_id, char **config_data) | |
{ | |
*(config_data) = (char*) | |
calloc(DLT_DAEMON_FLAG_MAX, sizeof(char)); | |
- strncpy(*config_data, | |
+ memcpy(*config_data, |
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
#!/usr/bin/env python | |
#-*- coding: utf8 -*- | |
from __future__ import print_function | |
from optparse import OptionParser | |
import zipfile | |
from sys import argv, exit | |
from subprocess import Popen, PIPE, check_output | |
import os.path |
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 ubuntu:18.04 | |
RUN sed -i 's/archive.ubuntu.com/tw.archive.ubuntu.com/g' /etc/apt/sources.list \ | |
&& rm /etc/dpkg/dpkg.cfg.d/excludes \ | |
&& apt update \ | |
&& dpkg -l | grep ^ii | cut -d' ' -f3 | xargs apt install -y --reinstall \ | |
&& apt install -y build-essential git man python cmake\ | |
&& git clone --recursive https://github.com/wsmoses/Tapir-Meta.git \ | |
&& cd /Tapir-Meta \ | |
&& ./build.sh release \ |
NewerOlder