Skip to content

Instantly share code, notes, and snippets.

View piranna's full-sized avatar

Jesús Leganés-Combarro piranna

View GitHub Profile
# AppendingTiffWriter
# -*- coding: utf-8 -*-
#
# "file object wrapper class" that is able to append a TIF to an existing one
#
# Code by @vashek (https://github.com/vashek) published at
# https://github.com/python-pillow/Pillow/issues/733#issuecomment-249380397
#
# Fixed PEP8 and clean by Jesús Leganés-Combarro 'piranna' <piranna@gmail.com>
@piranna
piranna / hexdump.log
Last active April 16, 2016 21:25
Shorten hexdump of a tar ball
# NodeOS layer 4.png
00000000 64 6f 63 73 2f 4e 6f 64 65 4f 53 20 6c 61 79 65 |docs/NodeOS laye|
00000010 72 20 34 2e 70 6e 67 00 00 00 00 00 00 00 00 00 |r 4.png.........|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 00 00 00 30 30 30 36 34 34 20 00 30 30 31 37 |....000644 .0017| # Information about the file
00000070 35 30 20 00 30 30 30 31 34 34 20 00 30 30 30 30 |50 .000144 .0000| #
@piranna
piranna / index.html
Last active August 29, 2015 14:15 — forked from formula1/blog.html
<!doctype html>
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.13/angular.min.js"></script>
<script type="text/javascript">
var path = "/NodeOS/NodeOS/issues";
</script>
</head>
<body>
<h1>NodeOS Blog</h1>
@piranna
piranna / mouse.js
Last active May 21, 2022 09:13 — forked from bfncs/mouse.js
/**
* Read Linux mouse(s) in node.js
* Author: Marc Loehe (marcloehe@gmail.com)
*
* Adapted from Tim Caswell's nice solution to read a linux joystick
* http://nodebits.org/linux-joystick
* https://github.com/nodebits/linux-joystick
*/
var fs = require('fs'),