Skip to content

Instantly share code, notes, and snippets.

@ZedYeung
ZedYeung / Ubuntu18.04_general_configuration.sh
Last active September 2, 2018 22:58
Ubuntu 18.04 developer environment configuration
#!/bin/bash
sudo apt-get update --fix-missing
# gdebi replace dpkg to solve dependencies during installation
sudo apt install -y gdebi
sudo apt install -y cmake
# communication
# Slack -- ubuntu software
#!/bin/bash
sudo cp -r ~/myfonts /usr/share/fonts/truetype
sudo fc-cache -fv
@ZedYeung
ZedYeung / v8_profile.sh
Last active July 16, 2019 20:39
nodejs
FILE="example"
node --prof --no-logfile-per-isolate --log --logfile=${FILE}.log ${FILE} && node --prof-process ${FILE}.log | less && rm ${FILE}.log
ab -n 100 -c 10 -m POST http://localhost:8080/processFileSync
loadtest -n 100 -c 10 -m POST http://localhost:8080/processFileSync
@ZedYeung
ZedYeung / how-to.md
Last active May 5, 2021 18:16 — forked from reywood/how-to.md
How to get a stack trace from a stuck/hanging python script

How to get a stack trace for each thread in a running python script

Sometimes a python script will simply hang forever with no indication of where things went wrong. Perhaps it's polling a service that will never return a value that allows the program to move forward. Here's a way to see where the program is currently stuck.

Install gdb and pyrasite

Install gdb.

# Redhat, CentOS, etc
@ZedYeung
ZedYeung / index.html
Created January 10, 2020 07:24
awesome-k8s
<h1 id="awesome-kubernetes">Awesome-Kubernetes</h1>
<h2 id="awesome-kubernetes-annotations">Copy from https://github.com/ramitsurana/awesome-kubernetes, used for learning</h2>
<p><a href="https://github.com/sindresorhus/awesome"><img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome"></a>
<a href="https://travis-ci.org/ramitsurana/awesome-kubernetes"><img src="https://travis-ci.org/ramitsurana/awesome-kubernetes.svg?branch=master" alt="Build Status"></a>
<a href="https://semaphoreci.com/ramitsurana/awesome-kubernetes"><img src="https://semaphoreci.com/api/v1/ramitsurana/awesome-kubernetes/branches/master/badge.svg" alt="Build Status"></a>
<a href="http://creativecommons.org/licenses/by-nc/4.0/"><img src="https://img.shields.io/badge/License-CC%204.0-brightgreen.svg?style=flat-square" alt="License"></a>
<a href="https://hub.docker.com/r/ramitsurana/awesome-kubernetes"><img src="https://img.shields.io/docker/build/ramitsurana/awesome-kubernet