This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bpm is from debian's bpm-tools package | |
# ffmpeg is from the usual places | |
# > bpmff "Rundfunk-Tanzorchester Ehrenfeld - Daft Punk - 'Harder, Better, Faster, Stronger'-B3gG03bh7WA.mp4" | |
# 123.181 | |
bpmff() { | |
if [ ! -f "$1" ]; then | |
echo "File not found" | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find $HOME/silab/SimplicityStudio_v4 -executable -type f -print0 | xargs --null -i@ ldd "@" > ~/sistudio_ldd.txt | |
sed -e 's@(0x[^)]*)@@' ~/sistudio_ldd.txt | sort -u | grep -v /home/ | grep -v 'not found' | grep '=>' | awk '{print $3}' | xargs -i@ dpkg -S '@' > ~/sistudio_pkg.txt | |
sed -e 's@: .*@@' ~/sistudio_pkg.txt| sort -u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG=-ggdb | |
selfprint: selfprint.c.o selfprint.c | |
$(CC) -o $@ $(DEBUG) $^ | |
selfprint.c.o: selfprint.c | |
objcopy -I binary -O elf64-x86-64 -B i386 $< $@ | |
.PHONY: show | |
show: selfprint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Connect to local mosquitto server over tls with no client authentication, then subscribe to everything. | |
// $(CC) -o mosqsub -lmosquitto mosqsub.c | |
/* vim: set sw=2 ts=2 expandtab: */ | |
//! @todo reconnect lost connections automatically | |
#include <mosquitto.h> | |
#include <poll.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ -lpthread -std=c++11 -o cxx11_threadcheckdone.cpp | |
/*! vim: set ts=2 sw=2 expandtab: */ | |
#include <stdio.h> | |
#include <thread> | |
#include <deque> | |
#include <string> | |
#include <mutex> | |
#include <condition_variable> | |
#include <future> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* Copyright 2017 Andrew Domaszek | |
* | |
* All rights reserved. | |
* This program made available under BSD-new. | |
*******************************************************************************/ | |
/** | |
* This example is designed for Linux, using such calls as setsockopt and gettimeofday. | |
* On embedded, it's likely that all of the mbedtls_net_* functions would need to be |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* g++ has_rtti.cpp -o has_rtti && ./has_rtti | |
* g++ -fno-rtti has_rtti.cpp -o has_rtti && ./has_rtti | |
* clang++ has_rtti.cpp -o has_rtti && ./has_rtti | |
* clang++ -fno-rtti has_rtti.cpp -o has_rtti && ./has_rtti | |
* @TODO: add msc++ cli, /GR, /GR- | |
* | |
* Copyright 2017, Andrew Domaszek | |
* All rights reserved. | |
* Program made available under BSD-new license. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
:<<"EOF" | |
openssl_acme_cert_script_examples.sh | |
CodeLibrary, server management | |
Inspecting acmetool generated certificates. | |
=========================================== | |
This file contains some handy script examples for checking various details in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright 2017-07-21 Andrew Domaszek | |
# BSD-New license | |
# https://wiki.debian.org/chroot | |
# https://superuser.com/questions/616922/schroot-dont-share-home-directory | |
# install prereqs: | |
# apt-get install debootstrap schroot |