Skip to content

Instantly share code, notes, and snippets.

Rémy F. yne

Block or report user

Report or block yne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yne
yne / bin.ls
Created Jan 11, 2020
github action binaries
View bin.ls
bindgen
cargo
cargo-clippy
cargo-fmt
cargo-miri
cbindgen
clippy-driver
rls
rust-gdb
rust-lldb
@yne
yne / mips-gen.c
Created Dec 30, 2019
unfinished MIPS generator for TCC
View mips-gen.c
/*
* MIPS3K code generator for TCC
*
* Based on mips-gen.c by Daniel Glöckner & Thomas Preud'homme
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
@yne
yne / dice.html
Created Dec 28, 2019
CSS-only dice demo
View dice.html
<style>
@keyframes roll {
00%{content:"⚀"}
16%{content:"⚁"}
33%{content:"⚂"}
50%{content:"⚃"}
66%{content:"⚄"}
84%{content:"⚅"}
100%{content:"⚀"}
}
View spinner.css
.spinner{
color:transparent;
pointer-events:none;
user-select: none;
position: relative;
}
.spinner:after {
animation: dot 1s infinite;
content:"⠋";
color:initial;
@yne
yne / av1.c
Created Aug 20, 2019
av1-like decoder
View av1.c
#include <math.h>
#include <stdio.h>
#define e(a, d) for(a=0;a<d;a++)
int YUV[3][1 << 20], tmpyuv[2048], scratch[166], width;
int p = 0, r = 1;//reader accu
int lumaRatio = 0, satuRatio = 0;//decode default
void read8b() {
int b = getchar();
View epoll.c
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
@yne
yne / csv2vcf.js
Last active Jul 6, 2019
Convert csv from outlook exported contact to android compliant vcard file
View csv2vcf.js
csv.split('\n').slice(1).filter(e=>e).map(l=>l.split(',')).map(a=>['BEGIN:VCARD','VERSION:2.1','N:'+[a[2],a[0],a[1]].join(';'),...a.slice(11,24).map(m=>`TEL;CELL:`+m),...a.slice(8,11).map(m=>'EMAIL;HOME:'+m),'END:VCARD'].filter(l=>!l.endsWith(':')).join('\n')).join('\n\n')
@yne
yne / polaris.conf
Created Jun 9, 2019
Current Polaris layers
View polaris.conf
miui_MIMIX2SGlobal_9.5.17_d62a4156e3_9.0.zip
lineage-16.0-20190606-nightly-polaris-signed.zip
Magisk-v19.3.zip
ANXCameraUnity_51.SecondhandPlumPooch.Polaris.zip // maybe useless ?
ANXCameraMagisk_5.OldShamefulAnt.zip
View dom.c
#include <stdio.h>
#include <stdint.h>
#include <termios.h>
#define LEN(ARR) ARR,sizeof(ARR)/sizeof(*ARR)
#define RGBA(R,G,B,A) ((R<<24) | (G<<16) | (B<<8) | A)
#define RGB(R,G,B) RGBA(R,G,B,255)
typedef enum{
RULE_NOP,
RULE_TEXT_COLOR,
@yne
yne / generic.lambda.c
Created Aug 12, 2018
C11 Lambda + Generic
View generic.lambda.c
#include <stdio.h>
#define fn(c) ({int _ c;_;})
#define list(c) sizeof(c)/sizeof(*c),c
#define map(LIST, CB) _Generic( (CB), int(*)(int, int, int*): map_arr, int(*)(int): map_val)(list(LIST), CB)
int map_val(size_t total, int *array, int (*cb)(int)) {
for(int i = 0; i < total; i++)
array[i] = cb(array[i]);
}
int map_arr(size_t total, int *array, int (*cb)(int, int, int*)) {
You can’t perform that action at this time.