Skip to content

Instantly share code, notes, and snippets.

View rchatsiri's full-sized avatar
🎯
Focusing

Chatsiri Rattana rchatsiri

🎯
Focusing
View GitHub Profile
@rchatsiri
rchatsiri / watchdog.log
Created August 10, 2020 16:22
simple build with spring boot
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>systems.tracethreat.serviceless</groupId>
<artifactId>watchdog</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<dependencies>
@rchatsiri
rchatsiri / debug.log
Created August 10, 2020 16:11
Firecraker debug logging with DWARF
(lldb) run --api-sock /tmp/firecracker.socket
Process 9986 launched: '/home/vagrant/workspacerust/firecracker/build/cargo_target/x86_64-unknown-linux-musl/debug/firecracker' (x86_64)
Process 9986 stopped
* thread #1, name = 'firecracker', stop reason = signal SIGSTOP
frame #0: 0x00000000007cee56 firecracker`__syscall + 25
firecracker`__syscall:
-> 0x7cee56 <+25>: retq
firecracker`stub_dlsym:
@rchatsiri
rchatsiri / structure.log
Created July 30, 2020 02:00
template project.
drwxr-xr-x 2 rchatsiri staff 64B Jul 26 08:47 luncher
drwxr-xr-x 2 rchatsiri staff 64B Jul 26 08:48 links
drwxr-xr-x 2 rchatsiri staff 64B Jul 26 08:48 storages
drwxr-xr-x 2 rchatsiri staff 64B Jul 27 01:04 scanner
drwxr-xr-x 2 rchatsiri staff 64B Jul 27 01:04 connector
@rchatsiri
rchatsiri / pi.yaml
Created October 25, 2019 10:11
Example run spark-operator
pi.yaml:
apiVersion: "sparkoperator.k8s.io/v1beta1"
kind: SparkApplication
metadata:
name: spark-pi
namespace: spark
spec:
type: Scala
mode: cluster
@rchatsiri
rchatsiri / .vimrc
Created July 6, 2019 13:50
Vim profile for github
set nu
set encoding=utf-8
set nocompatible " be iMproved, required
filetype off " required
" et the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@rchatsiri
rchatsiri / build-image
Created May 15, 2019 07:28
Build small operating system in binary format.
# https://github.com/solo-io/unik/blob/master/containers/compilers/firecracker/build-image
#!/bin/bash
# run this container like so
# docker run --rm --privileged -v /path/to/code:/go/src/gopath/to/code firecracker-builder
set -ex
dd if=/dev/zero of=/tmp/rootfs bs=1M count=50
devops00@firework-vm01:~/workspacesdn/firecracker/build/debug$ sudo curl --unix-socket /tmp/firecracker.socket -i \
> -X PUT 'http://localhost/boot-source' \
> -H 'Accept: application/json' \
> -H 'Content-Type: application/json' \
> -d '{
> "kernel_image_path": "./hello-vmlinux.bin",
> "boot_args": "console=ttyS0 reboot=k panic=1 pci=off"
> }'
HTTP/1.1 204 No Content
Date: Tue, 14 May 2019 10:11:08 GMT
@rchatsiri
rchatsiri / Vagrantfile
Created December 14, 2018 03:27
Mount Vbox with local host directory.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.provider "virtualbox" do |vb|
vb.name = "firecracker-servless"
vb.memory = 8282
vb.cpus = 8
end
@rchatsiri
rchatsiri / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created September 14, 2018 08:12 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@rchatsiri
rchatsiri / boot-demo-service-full.log
Created May 20, 2018 01:05
Full error log after run demo-service on IncludeOS.
vagrant@ubuntu-xenial:/IncludeOS/examples/demo_service$ sudo boot . --verbose --debug
* <boot>: VERBOSE mode set for environment
[ WARNING ] WARNING: Environment variable INCLUDEOS_PREFIX is not set. Trying default /usr/local
* <VMRunner>: Loading default config.
* <VMRunner>: Trying to load config from /usr/local/includeos/vmrunner/vm.default.json
* <VMRunner>: Successfully loaded vm config
* <VMRunner>: " Single virtio nic with vanilla cpu features "
* <VMRunner>: Trying to load config from ./vm.json
* <VMRunner>: " {} "
* <boot>: Args to pass to VM: []