Skip to content

Instantly share code, notes, and snippets.

View diskchecker.pl
#!/usr/bin/perl
#
# Brad's el-ghetto do-our-storage-stacks-lie?-script
#
sub usage {
die <<'END';
Usage: diskchecker.pl -s <server[:port]> verify <file>
diskchecker.pl -s <server[:port]> create <file> <size_in_MB>
diskchecker.pl -l [port]
@cccheng
cccheng / c_cpp_properties.json
Created May 26, 2020
c_cpp_properties.json for linux kernel
View c_cpp_properties.json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceRoot}",
"${workspaceRoot}/include",
"${workspaceRoot}/include/generated",
"${workspaceRoot}/arch/x86/include",
"${workspaceRoot}/arch/x86/include/generated"
View llvm note
# Latest
deb http://apt.llvm.org/buster/ llvm-toolchain-buster main
deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster main
# 9
deb http://apt.llvm.org/buster/ llvm-toolchain-buster-9 main
deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-9 main
--
llvm , llvm-11
llvm-dev , llvm-11-dev
View termsize.py
#!/usr/bin/env python
# http://shallowsky.com/blog/hardware/serial-24-line-terminals.html
# https://github.com/akkana/scripts/blob/master/termsize
# Get the current size of the terminal window, and set stty size accordingly.
# A replacement for xterm's resize program, with no X dependency.
# Useful when logged in over a serial line.
# Copyright 2013 by Akkana Peck -- share and enjoy under the GPL v2 or later.
View prettyping.sh
#!/bin/bash
#
# Written by Denilson Figueiredo de Sá <denilsonsa@gmail.com>
# MIT license
#
# Requirements:
# * bash (tested on 4.20, should work on older versions too)
# * awk (works with GNU awk, nawk, busybox awk, mawk)
# * ping (from iputils)
#