Skip to content

Instantly share code, notes, and snippets.

@Mygod
Mygod / gist:f5b23ed493e3b892537940ae8e2645f4
Created January 16, 2019 06:53
Cross compile iftop for mips
sudo apt-get install --install-recommends gcc-mips-linux-gnu cpp-mips-linux-gnu
# libpcap
git checkout libpcap-1.9.0
mkdir out
export LIBPCAP=`pwd`/out
./configure --host=mips-linux-gnu --prefix=$LIBPCAP
make install
# libncurses
@frankcleary
frankcleary / boundedexecutor.py
Last active June 28, 2023 10:56
Python ThreadPoolExecutor with bounded queue
from concurrent.futures import ThreadPoolExecutor
from threading import BoundedSemaphore
class BoundedExecutor:
"""BoundedExecutor behaves as a ThreadPoolExecutor which will block on
calls to submit() once the limit given as "bound" work items are queued for
execution.
:param bound: Integer - the maximum number of items in the work queue
#!/bin/bash
#
# This script will install ansible including sshpass for --ask-pass functionality
# under cygwin.
# Before running this install cygwin and select lynx package to be install.
#
# Script Starts Here
#
#
# fetch apt-cyg via lynx