Skip to content

Instantly share code, notes, and snippets.

View amitt001's full-sized avatar

Amit Tripathi amitt001

View GitHub Profile
@amitt001
amitt001 / ttfb.sh
Created May 23, 2019 14:39 — forked from sandeepraju/ttfb.sh
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
package main
import (
"sync"
"fmt"
"time"
"github.com/amitt001/moodb/client"
server "github.com/amitt001/moodb/mdbserver"
)
@amitt001
amitt001 / proc_debug.md
Last active November 28, 2019 09:32
Process/Thread debugging

Debug Process/Threads

List threads

ps -e -T

A specific pid

ps -Tp <pid>

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/amittripathi/.oh-my-zsh
export EDITOR=vim
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
"""
Returns result in the format:
{
"B": {
2401: "1/6 = 2%",
3101: "1/6 = 2%"
},
"C": {
"02": "3/6 = 50%"