Skip to content

Instantly share code, notes, and snippets.

View holishing's full-sized avatar
🌴
On vacation

holishing holishing

🌴
On vacation
View GitHub Profile
@arantius
arantius / simple-rrd-merge.py
Created March 23, 2012 02:43
A very simple script to merge multiple RRD files, since none of those available seem to work.
#!/usr/bin/env python
"""Simple script to merge multiple RRD files together.
Accepts any number of RRD file names as arguments. Produces an "rrdtool dump"
style file on stdout. The last RRD file should have a slot for every possible
record in the resulting merged RRD.
Run something like:
$ python simple-merge-rrd.py filea.rrd fileb.rrd filec.rrd | \
@willurd
willurd / web-servers.md
Last active May 30, 2024 02:54
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@XVilka
XVilka / TrueColour.md
Last active May 28, 2024 17:42
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@christianberg
christianberg / Dockerfile
Last active January 10, 2023 16:58
Sharing a unix socket between a Docker container and it's host
FROM ubuntu
RUN apt-get update
RUN apt-get install -y socat
VOLUME /foo
CMD socat UNIX-LISTEN:/foo/bar.sock -
@v-lopez
v-lopez / debian_from_pip_install.sh
Last active December 26, 2023 16:34
Debian from pip install
#How to generate debian for package foobar
# Need to have install pip package stdeb
PKG=foobar
pip install -d . $PKG
tar xfvz $PKG*.tar.gz
cd $PKG*
python setup.py --command-packages=stdeb.command bdist_deb
#Debian is generated within deb_dist directory
@h0tw1r3
h0tw1r3 / mingw-copy-deps.sh
Created October 16, 2015 15:25
Recursively copy windows binary (dll/exe) dependencies from a sysroot (mingw toolchain) to the binaries directory.
#!/usr/bin/env bash
#
# Copyright: © 2015 Jeffrey Clark <https://github.com/h0tw1r3/>
# License: GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
#
set -o errtrace
error() {
echo "ERROR in $0 : line $1 exit code $2"
exit $2

Chromium OS ft. Docker

Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the HP Chromebook 13 G1 (aka HP Spyder Chromebook), but I can't think of any reason it wouldn't work with other devices. The Chromebook Pixel 2 (2015), for example...as you'll notice, the guide this was forked from assumed that machine.

  1. Create a build environment
  2. Customize the kernel
  3. Build Chromium OS
  4. Flash Chromium OS to USB
  5. Install Chromium OS
@lixingcong
lixingcong / my_site.conf
Last active October 18, 2022 06:23
nginx autoindex timezone setting
location ^~ /demo {
alias /var/www/demo/;
autoindex on;
# set to on means use localtime
autoindex_localtime on;
# show size with unit 'MB' instead of 'Byte'
autoindex_exact_size off;
}
@elehcim
elehcim / build.sh
Last active January 11, 2024 22:58
termux conda installation trial
apt update && apt upgrade
apt install python python-dev pip clang
pip install --upgrade pip
pip install conda
## All the following packages are needed by conda
pip install auxlib ruamel.yaml requests
## Install pycosat (this can be ignored if https://github.com/ContinuumIO/pycosat/pull/29 is fixed)
wget https://pypi.python.org/packages/76/0f/16edae7bc75b79376f2c260b7a459829785f08e463ecf74a8ccdef62dd4a/pycosat-0.6.1.tar.gz#md5=c1fc35b17865f5f992595ae0362f9f9f
tar -xf pycosat-0.6.1.tar.gz
@awesomebytes
awesomebytes / debian_from_ros_pkg.md
Last active June 1, 2024 20:55
How to create a debian from a ROS package