Skip to content

Instantly share code, notes, and snippets.

@MoSal
MoSal / .EMPTY
Last active July 28, 2022 14:42
jpeg-decoder *fix*
EMPTY
From ffd3f71103302082e6bb2460f9a0ababc0311629 Mon Sep 17 00:00:00 2001
From: Mohammad AlSaleh <[email protected]>
Date: Mon, 22 Jun 2020 04:00:44 +0300
Subject: [PATCH] Explicitly use `signed char` instead of `char` where needed
Should fix ARM builds.
Signed-off-by: Mohammad AlSaleh <[email protected]>
---
src/lib/exhaleEnc.h | 2 +-
@MoSal
MoSal / nom_vs_peg
Last active February 9, 2017 16:54
nom vs. peg (using cargo-esr)
$ cargo esr -c nom
-------------------------------------------------
Crate Score Details
-------------------------------------------------
self.has_desc | 1 * 5.000 | +5.000
self.has_license | 1 * 5.000 | +5.000
self.has_docs | 1 * 15.000 | +15.000
self.activity_span_in_months.powf(0.5) | 4.928 * 6.000 | +29.571
self.releases | 41 * 0.750 | +30.750
self.non_yanked_releases | 41 * 0.750 | +30.750
#include <unistd.h>
#include <stdio.h>
#include <windows.h>
int main() {
printf("isatty(fileno(stdout)) returned %d\n", isatty(fileno(stdout)));
printf("_isatty(fileno(stdout)) returned %d\n", _isatty(fileno(stdout)));
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);