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
seek enf of file to get the size | |
define Find message: | |
if (size of file - current offset) is smaller than size of "From:", | |
memcopy the last (size of file - current offset) characters at the beginning of the buffer and load | |
(size of buffer - ((size of file - current offset)) into the buffer | |
Look at the (current offset + lenght of "From:" - 1)th character in the buffer, if it is :, check previous, if it is m, check previous, etc... | |
If not, check if |
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <strings.h> | |
#include <inttypes.h> | |
// Dimensions are statically defined for now | |
#define WIDTH 32 | |
#define HEIGHT 32 |
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
# With the help of: | |
# https://github.com/video-dev/hls.js | |
# https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Live_streaming_web_audio_and_video | |
# https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/using.html | |
Preconditions: | |
export DEST_PATH ... | |
export GS_VERSION=$GS_VERSION | |
For gstreamer: | |
bison |
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
<style> | |
body { | |
margin:0px; | |
} | |
textarea { /* position is inherited */ | |
left: 0; | |
top: 0; | |
right: 0; | |
height: 50vw; /* Actually the height of select and input */ |
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/bash | |
if [[ $# -ne 3 ]] | |
then | |
echo "usage: $0 <config_file> <board_config_file> <rest_config_file>" | |
exit 0 | |
fi | |
CONFIG=$1 | |
BOARD=$2 |
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
// An observable is an helper class that creates a Subscriber and pass it | |
// an OnScubscribe method. | |
public class Observable<T> { | |
public Observable(OnSubscribe<T> func) { | |
onSubscribe = func; | |
} | |
public Subscription subscribe(Observer<? super T> observer) { | |
if (observer instance Subscriber) { | |
return subscribe((Subscriber<? super T>) observer); |
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
curl -sOL https://buildroot.org/downloads/buildroot-2017.08.tar.gz | |
tar xf buildroot-2017.08.tar.gz | |
cd buildroot-2017.08/ | |
make nconfig | |
# This is to point getty to the serial console instead of tty1 | |
cat > /tmp/fixinittab.sh << 'EOF' | |
#!/bin/sh | |
sed -ie 's/tty1/ttyS0/g' ${TARGET_DIR}/etc/inittab | |
EOF | |
chmod +x /tmp/fixinittab.sh |
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
cat coloredtext | sed 's/\x1b\[[0-9;]*m//g' |
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
// cc -Wall -Wextra -Wpedantic -Wfatal-errors -O3 /tmp/trim.c -o /tmp/trim | |
#include <stdio.h> | |
#include <ctype.h> | |
#include <string.h> | |
#include <stdint.h> | |
#define FAIL() { \ | |
++totalres; \ | |
fprintf(stderr, "%s failed at %s(%i)\n", __func__, __FILE__, __LINE__); \ | |
} |
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
FROM alpine:3.5 | |
RUN apk add --no-cache bash vim python git | |
RUN cd / && git clone https://github.com/pydicom/pydicom.git | |
RUN cd / && git clone https://github.com/pydicom/pynetdicom3.git | |
ENV PYTHONPATH=/pydicom/:/pynetdicom3/ |