Skip to content

Instantly share code, notes, and snippets.

View tzikis's full-sized avatar

Vasilis Georgitzikis tzikis

View GitHub Profile
@tzikis
tzikis / Validator.sol
Created June 28, 2022 10:34
Testing solidity message validation
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
pragma abicoder v2;
contract ECRecoverTest {
constructor() {
}
@tzikis
tzikis / gist:23aede0b6e8d93a01b44f78a33f572c3
Created March 13, 2018 18:32
testing usb hardware speeds with dd, script from @spanceac
for i in {a..p}; do
dd if=/dev/zero of=/dev/sd${i} bs=4M count=2000 conv=fsync oflag=direct 2>log-sd${i} &
done
sleep 60
killall -USR1 dd
sleep 1
killall dd
cat log-sd* | awk '{sum += $10} END {print "Total bandwidth: " sum " MB/s"}'
C0 00 08 24 00 00 00 00 00 07 07 12 20 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 C0
C0 00 08 24 00 00 00 00 00 07 07 12 20 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 C0
C0 00 08 24 00 00 00 00 00 07 07 12 20 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 C0
C0 00 08 24 00 00 00 00 00 07 07 12 20 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 C0 72 18 02 00 6C 9C 98 72 9F 00 8C 63 02 E2 6E 80 04 08 E0 0C 10 8C 0C 1C 82 EC 1C 70 8C 7C 8E 82 9F 00 EC 70 02 92 9F C7 92 9C E4 8C 1C 70 0C 18 0C F2 6E 6E E4 02 84 3B F2 6E 84 92 9C E4 0C 1B 82 0C 62 E7 24 19 72 10 02 72 10 02 C0 00 08 24 00 00 00 00 00 07 07 12 20 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 C0
C0 00 08 24 00 00 00 00 00 07 07 12 20 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 5
@tzikis
tzikis / gist:7374759
Last active December 27, 2015 19:09
codebender description

Overview

codebender is an open-source online IDE for Arduino developers, makers and engineers that incorporates many advanced development tools existing in other sectors of software development and brings them to the Arduino. Apart from that, being online makes it a powerful collaboration platform, where users can share code, clone other users’ projects, and collaborate in teams.

Objectives

The objective of this assignment is to get the students acquainted with a real-world open source project and with established coding practices. codebender is comprised of a 4-5 independent subsystems, which communicate with each other via REST calls, so the students can also learn about architecture design, and get a clear idea of a clear, web-based system architecture. The end objective is to fix known bugs in the codebase, and after getting acquainted with the code, to start implementing new features such as collaboration, code completion in the IDE, premium features for users, or porting codebender to other pla

/**
* Arduino Coap Example Application.
*
* This Example creates a CoAP server with 2 resources.
* resGET : A resource that contains an integer and the GET method is only available.
* A GET request returns the value of the value_get variable.
* resGET-POST : A resource that contains an integer and the GET-POST methods are available.
* A GET request returns the value of the value_post variable.
* A POST request sets the value of value_post to the sent integer.
* Both resources are of TEXT_PLAIN content type.