Skip to content

Instantly share code, notes, and snippets.

@Chion82
Chion82 / virtualbox_ports.png
Created June 2, 2022 14:42 — forked from snb/virtualbox_ports.png
virtualbox serial console
virtualbox_ports.png
@Chion82
Chion82 / debian-mips64el-on-qemu.md
Created March 19, 2022 01:33 — forked from sergev/debian-mips64el-on-qemu.md
Installing Debian MIPS64 on QEMU

Let's install Debian 9.0 "Stretch" on QEMU MIPS64 under Ubuntu.

Step 1: Install QEMU

sudo apt install qemu-system-mips

Step 2: Download Linux kernel and installation image

wget http://ftp.debian.org/debian/dists/stretch/main/installer-mips64el/current/images/malta/netboot/vmlinux-4.9.0-8-5kc-malta
@Chion82
Chion82 / Golang static build
Last active October 14, 2020 10:07 — forked from PurpleBooth/Dockerfile
Create a static binary in go
go build -ldflags "-linkmode external -extldflags -static"
@Chion82
Chion82 / tunnel.sh
Created June 3, 2018 09:32 — forked from vishvananda/tunnel.sh
Script to set up an ipsec tunnel between two machines For Example: ./tunnel.sh 10.10.10.1 10.10.10.2 192.168.0.1 192.168.0.2 would set up an ipsec tunnel over 10.10.10.1 address using 192.168.0.1 as a virtual address passwordless sudo required for user on remote machine
#!/bin/bash
if [ "$4" == "" ]; then
echo "usage: $0 <local_ip> <remote_ip> <new_local_ip> <new_remote_ip>"
echo "creates an ipsec tunnel between two machines"
exit 1
fi
SRC="$1"; shift
DST="$1"; shift
@Chion82
Chion82 / mirror-port.sh
Created May 22, 2018 15:56 — forked from lonelymtn/mirror-port.sh
Mirror traffic between two interfaces using Linux's traffic controll subsystem (tc)
#!/usr/bin/env bash
# Time-stamp: <2014-07-31 13:31:43 (ryanc)>
#
# Description: Mirror traffic between two interfaces using Linux's
# traffic control subsystem (tc)
trap cleanup EXIT
CLEANUP=1
SRC_IFACE=$1
@Chion82
Chion82 / webpack-for-node-modules.js
Created May 16, 2017 08:57 — forked from mxstbr/webpack-for-node-modules.js
How to use webpack to compile node modules
/* eslint-disable no-var */
var path = require('path');
var autoprefixer = require('autoprefixer');
const MATCH_ALL_NON_RELATIVE_IMPORTS = /^\w.*$/i;
module.exports = [{
output: {
filename: '[name].js',
library: 'atrium-react-plugin-beta',
@Chion82
Chion82 / webpack-for-node-modules.js
Created May 16, 2017 08:57 — forked from mxstbr/webpack-for-node-modules.js
How to use webpack to compile node modules
/* eslint-disable no-var */
var path = require('path');
var autoprefixer = require('autoprefixer');
const MATCH_ALL_NON_RELATIVE_IMPORTS = /^\w.*$/i;
module.exports = [{
output: {
filename: '[name].js',
library: 'atrium-react-plugin-beta',
@Chion82
Chion82 / Makefile
Created November 27, 2016 16:51 — forked from llj098/Makefile
a sample tcp server runs in kernel
obj-m += tcp_svr_sample.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clea