Skip to content

Instantly share code, notes, and snippets.

View erubboli's full-sized avatar

Enrico Rubboli erubboli

View GitHub Profile
@erubboli
erubboli / TetherToken.sol
Created October 19, 2023 05:04 — forked from plutoegg/TetherToken.sol
TetherToken.sol - Tether.to USD
pragma solidity ^0.4.11;
/**
* Math operations with safety checks
*/
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
{
"id": 556186559,
"out": 2,
"total": 222773,
"fee": 8400,
"size": 249
}
{
"id": 556186558,
"out": 2,
*.sol linguist-language=Solidity
/* Box for the udoo 7'' touch screen */
/* Author: Enrico Rubboli */
// box size
box = [180,115,35];
round_size = 2;
inner_box = [box[0]-round_size*2, box[1] - round_size*2, box[2]];
box_color = "white";
// part of the display visible from the outside
@erubboli
erubboli / ping_google.txt
Created January 30, 2015 18:08
bad broadband in span
...
64 bytes from 8.8.8.8: icmp_seq=873 ttl=51 time=209.273 ms
64 bytes from 8.8.8.8: icmp_seq=874 ttl=51 time=205.171 ms
64 bytes from 8.8.8.8: icmp_seq=875 ttl=51 time=260.590 ms
64 bytes from 8.8.8.8: icmp_seq=876 ttl=51 time=191.092 ms
64 bytes from 8.8.8.8: icmp_seq=877 ttl=51 time=148.214 ms
64 bytes from 8.8.8.8: icmp_seq=878 ttl=51 time=269.562 ms
64 bytes from 8.8.8.8: icmp_seq=879 ttl=51 time=175.251 ms
64 bytes from 8.8.8.8: icmp_seq=880 ttl=51 time=115.748 ms
64 bytes from 8.8.8.8: icmp_seq=881 ttl=51 time=233.753 ms
@erubboli
erubboli / archive.sql
Created September 3, 2014 10:33
archiving using CTE (pg)
WITH archive AS (
DELETE FROM arrivals
WHERE created_at < now() - interval '1 hours'
RETURNING *
)
INSERT INTO archived_arrivals
SELECT * FROM archive;
DELETE FROM archived_arrivals
WHERE created_at < now() - interval '3 days';
@erubboli
erubboli / hosts
Created August 6, 2014 10:18
for a safer facebook experience
# F**k you Facebook
127.0.0.1 www.facebook.com www.facebook.it facebook.com
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 www.static.ak.fbcdn.net
127.0.0.1 login.facebook.com www.login.facebook.com
127.0.0.1 fbcdn.net www.fbcdn.net fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.connect.facebook.com
127.0.0.1 www.static.ak.connect.facebook.com
@erubboli
erubboli / keybase.md
Last active October 21, 2016 17:50
keybase.md

Keybase proof

I hereby claim:

  • I am erubboli on github.
  • I am dn2k (https://keybase.io/dn2k) on keybase.
  • I have a public key ASAlYiyTHeBhEvu-HKODGBC-4ldpkl9ycqOm6CTzwdLljwo

To claim this, I am signing this object:

q : 20
e : 14
t : 14
o : 10
i : 10
l : 8
a : 8
d : 8
n : 7
Protection methods :
- OAUTH2
- pros:
- already in place
- secure
- cons:
- increase latency because of the bouncing requests (verify)
- very complicated (verify)