Skip to content

Instantly share code, notes, and snippets.

@f2hex
f2hex / apitest
Created February 27, 2024 06:19
bash shell script to test REST API for a CRUD app
#!/usr/bin/env bash
API_URL="http://localhost:9301"
# Associative array to define permitted API calls, their corresponding endpoint paths, and HTTP verbs
declare -A api_calls=(
[users]="GET /api/users"
[update]="PUT /api/update"
[read]="GET /api/read"
[delete]="DELETE /api/delete"
"""
Very simple SMTP server to process image stills received from ip-cams and GDS3710.
Franco Fiorese <franco.fiorese@gmail.com>
May 2017
"""
from datetime import datetime
import asyncore, sys, email, os

Keybase proof

I hereby claim:

  • I am f2hex on github.
  • I am f2hex (https://keybase.io/f2hex) on keybase.
  • I have a public key ASBMB6D1BKFLzV9-2PYiDlXnrks4m7Z3FT5rOyzRGwDc0Ao

To claim this, I am signing this object:

@f2hex
f2hex / index.html
Created February 4, 2017 10:09
YNvKqb
<div id="root">
<!-- This div's content will be managed by React. -->
</div>
@f2hex
f2hex / a-responsive-table.markdown
Created January 6, 2017 07:34
A responsive table

A responsive table

An example of a responsive table implementing "display: block" on the tr and td elements.

A Pen by Aurer on CodePen.

License.

@f2hex
f2hex / index.html
Created December 30, 2016 07:59
Pure CSS radial progress bar
<div class="set-size charts-container">
<div class="pie-wrapper progress-30">
<span class="label">30<span class="smaller">%</span></span>
<div class="pie">
<div class="left-side half-circle"></div>
<div class="right-side half-circle"></div>
</div>
</div>
<div class="pie-wrapper progress-60">
@f2hex
f2hex / blockchain.id
Created March 6, 2016 06:31
Blockchain ID
Verifying that +f2_hex is my blockchain ID. https://onename.com/f2_hex
@f2hex
f2hex / gist:3905efe7140265fe7b5b
Last active January 10, 2016 13:45
Content of the motion size optmized build for ARM HF
FROM f2hex/armhf-motion:latest
MAINTAINER Franco Fiorese <franco.fiorese@gmail.com>
COPY . /
RUN mkdir -p /etc/motioneye /var/lib/motioneye /var/run/motioneye /var/log/motioneye
# configuration files (motioneye needs to update config files)
VOLUME ["/etc/motioneye", "/var/run/motioneye", "/var/log/motioneye", "/var/lib/motioneye"]
@f2hex
f2hex / gist:431a6950ebbec64340e8
Last active January 10, 2016 13:46
Content of the python size optimized build for ARM HF
#!/bin/bash
VOL_CONFIG="/mnt/survpad/test/me/config:/etc/motioneye"
VOL_RUN="/mnt/survpad/test/me/run:/var/run/motioneye"
VOL_LOG="/mnt/survpad/test/me/log:/var/log/motioneye"
VOL_MEDIA="/mnt/survpad/test/me/media:/var/lib/motioneye"
docker run \
-i \
-v $VOL_CONFIG \
-v $VOL_RUN \
-v $VOL_MEDIA \