Skip to content

Instantly share code, notes, and snippets.

@Niols
Niols / screenshot.sh
Created May 25, 2020 22:55
Draft of screenshoting script that also copies the output to clipboard
#!/bin/sh
set -e
readonly PROGNAME=$(basename "$0")
help () {
cat <<EOF
Usage: $0 [OPTIONS]
Options can be:
@Niols
Niols / run.sh
Last active April 1, 2019 08:19
Script to run Morbig and Dash on a Software Heritage archive and compare the results.
#!/bin/sh
set -euC
cd "$(dirname "$0")"
command -v >/dev/null morbig
command -v >/dev/null dash
while [ $# -gt 0 ]; do
case $1 in
--corpus)
@Niols
Niols / Makefile
Created August 10, 2018 10:49
Minimal example for colis-anr/morbig#37
.PHONY: build clean
OCAMLBUILD=ocamlbuild -use-ocamlfind
build:
$(OCAMLBUILD) test.native
clean:
$(OCAMLBUILD) -clean
@Niols
Niols / gpio.sh
Last active January 30, 2017 15:24
Shell functions to control the C.H.I.P GPIO pins
#!/bin/sh
## This shell script aims to help you in controlling the XIO-P0 to
## XIO-P7 expander GPIO pins [2] of the C.H.I.P. [1]. It should work
## with any Debian Policy-compliant shell [3]. It is advised to use it
## with the `-e' flag [4].
##
## [1]: To know more about C.H.I.P.: https://getchip.com/
##
## [2]: To know more about the pins of your C.H.I.P.:
<!doctype html>
<html lang="en">
<head>
<title>Get Ampache!</title>
<style type="text/css">
pre.command-output
{
font-family: monospace;
background: black;
## ## =============== ##
## ## Server Settings ##
## ## =============== ##
##
## Server settings for a Teeworlds 0.6.3 server.
## To choose the config file, use the `-f` option.
##
## https://www.teeworlds.com/?page=docs&wiki=server_settings
##
## To change the game's physics, read the Server Tuning doc.
@Niols
Niols / align_string.py
Last active August 29, 2015 14:22
Align text string using spaces between words to fit specified width
'''
align_string.py
Align string with spaces between words to fit specified width
Author: Denis Barmenkov <denis.barmenkov@gmail.com>
Copyright: this code is free, but if you want to use it,
please keep this multiline comment along with function source.
Thank you.