Skip to content

Instantly share code, notes, and snippets.

View gangliao's full-sized avatar
🏠
Working from home

Gang Liao gangliao

🏠
Working from home
View GitHub Profile
### Keybase proof
I hereby claim:
* I am gangliao on github.
* I am gangliao (https://keybase.io/gangliao) on keybase.
* I have a public key ASBMZAZ036MtjOrnnl1dpRYibO_ZNf5pxSS1EM8iPhogJQo
To claim this, I am signing this object:
@gangliao
gangliao / arm_cjpeg.txt
Last active April 7, 2018 08:59
Mixed ARM and Thumb code
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
22.44 0.35 0.35 3000 0.12 0.12 rgb_ycc_convert
20.51 0.67 0.32 52828 0.01 0.01 encode_mcu_huff
18.59 0.96 0.29 211031 0.00 0.00 forward_DCT
17.95 1.24 0.28 316406 0.00 0.00 jpeg_fdct_islow
12.18 1.43 0.19 preload_image
-- Logs begin at Thu 2018-04-12 23:33:59 CST, end at Thu 2018-05-03 16:28:49 CST. --
May 03 15:52:34 nmyjs_170_36 kubelet[10616]: W0503 15:52:34.980720 10616 helpers.go:847] eviction manager: no observation found for eviction signal allocatableNodeFs.available
May 03 15:52:36 nmyjs_170_36 kubelet[10616]: I0503 15:52:36.358267 10616 kubelet_node_status.go:609] Update capacity for nvidia.com/gpu to 8
May 03 15:52:45 nmyjs_170_36 kubelet[10616]: W0503 15:52:45.002416 10616 helpers.go:847] eviction manager: no observation found for eviction signal allocatableNodeFs.available
May 03 15:52:46 nmyjs_170_36 kubelet[10616]: I0503 15:52:46.393167 10616 kubelet_node_status.go:609] Update capacity for nvidia.com/gpu to 8
May 03 15:52:55 nmyjs_170_36 kubelet[10616]: W0503 15:52:55.023856 10616 helpers.go:847] eviction manager: no observation found for eviction signal allocatableNodeFs.available
May 03 15:52:56 nmyjs_170_36 kubelet[10616]: I0503 15:52:56.428377 10616 kubelet_node_status.go:609] Update capacity

Freeflow

TCP Physical Bandwidth

ethtool eth0 | grep Speed
# 	Speed: 1000Mb/s

Freeflow

TCP Physical Bandwidth

ethtool eth0 | grep Speed
# 	Speed: 1000Mb/s
# check os kernel version
echo "dump os kernel info:"
uname -a
# check IP
echo "dump IP info:"
ip -4 addr show scope global dev eth0 | grep inet | awk '{print $2}' | cut -d / -f 1
# check infiniband
echo "dump IB info:"
@gangliao
gangliao / checksum.c
Last active July 1, 2018 04:20
checksum
#include <arpa/inet.h>
#include <stdio.h>
#include <unistd.h>
/*
IP Checksum
Benefits: fast, easy to compute and check which is motivated by earliest
software implementation.
#define POLYNOMIAL 0xD8 /* 11011 followed by 0's */
uint8_t crc_naive(uint8_t const message)
{
uint8_t remainder;
remainder = message;
for (uint8_t bit = 8; bit > 0; --bit)
{
/* If the uppermost bit is a 1... */
#!/bin/sh
set -xe
#0. clean
sudo rm -rf /etc/kubernetes/
sudo rm -rf ~/node_bin
export http_proxy=http://10.130.14.129:8080
export https_proxy=http://10.130.14.129:8080
@gangliao
gangliao / bitcoin.dockerfile
Last active July 4, 2018 12:51
Bitcoin Dockerfile
FROM ubuntu:16.04
MAINTAINER Gang Liao <gangliao@cs.umd.edu>
ARG UBUNTU_MIRROR
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
RUN apt-get update && apt-get install -y --no-install-recommends \
git python3-pip python3-dev openssh-server g++ pkg-config \
wget unzip unrar tar xz-utils bzip2 gzip coreutils \
curl sed grep vim librdmacm-dev libibverbs-dev libboost-all-dev \