Skip to content

Instantly share code, notes, and snippets.

🍺
public volatile void

Rémy F. yne

🍺
public volatile void
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 / csv2vcf.js
Last active Jun 16, 2019
Convert csv from outlook exported contact to android compliant vcard file
View csv2vcf.js
csv.split('\n').slice(1).map(l=>l.split(',')).map(a=>['BEGIN:VCARD','N:'+[a[0],a[2],a[1]].join(';'),...a.slice(11,24).map(m=>`TEL;VOICE:`+m),...a.slice(8,11).map(m=>'EMAIL;INTERNET:'+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*)) {
@yne
yne / postinstall.sh
Last active May 3, 2018
wget -O- git.io/yne.install | bash
View postinstall.sh
#!/bin/bash
set -x
crontab -l | grep -q .wall || (echo '0 * * * * ID=$(curl -sL gist.githubusercontent.com/yne/729655bd0557bfde7a088e15b40b9e6d/raw/ | shuf -n 1);for t in jpg png; do curl -sfL nik.bot.nu/o$ID.$t -o "$HOME/.wall"; done') | crontab -
#wget http://ppa.launchpad.net/oiteam/xfce4/ubuntu/pool/main/x/xfce4-windowck-plugin/xfce4-windowck-plugin_0.3.1-0ubuntu1~oiteam0_$(uname -m | grep -q 64 && echo amd64 || echo i386).deb &&
#until sudo dpkg --install *.deb ; do sleep 10 ; done
#rm -f *.deb
#curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg >/dev/null
View gist:e2e352b8aabf8c8598dad3bc388a9071
<!doctype html>
<html>
<script>$=document.querySelectorAll.bind(document);</script>
<style>
body {
font-size:2em;
margin:0;height: 100vh;
display: grid;
grid-template-columns: 1fr 5fr;
grid-template-areas: "header header" "aside main" "footer footer";}
@yne
yne / sceAvDecode.c
Created Nov 24, 2017
PsVita sceAv Decode usage
View sceAvDecode.c
static void vita_setup(int videoFormat, int width, int height) {
int width=960;
int height=544;
char rasm_buff[DECODER_BUFFER_SIZE];
int dbuf_idx = 1;
/* Init display and decoder*/
gs_sps_init();
SceUID displayblock = sceKernelAllocMemBlock("display", SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW, 2 * FRAMEBUFFER_SIZE, &((SceKernelAllocMemBlockOpt){ sizeof(SceKernelAllocMemBlockOpt), 4, FRAMEBUFFER_ALIGNMENT}));
void *base;
sceKernelGetMemBlockBase(displayblock, &base);
@yne
yne / main.c
Created Sep 2, 2017
PSV Progress
View main.c
#include <string.h>
#include <stdbool.h>
#include <psp2/types.h>
#include <psp2/kernel/processmgr.h>
#include <psp2/message_dialog.h>
#include <psp2/display.h>
#include <psp2/apputil.h>
#include <psp2/gxm.h>
#include <psp2/ctrl.h>
#include <psp2/kernel/sysmem.h>
@yne
yne / ipbook.py
Created Mar 12, 2017
Google AppEngine most recent visitor page
View ipbook.py
#!/usr/bin/env python
from flask import Flask
from flask import request
from datetime import datetime
app = Flask(__name__)
#app.config['DEBUG'] = True
from google.appengine.ext import ndb
class Client(ndb.Model):
addr = ndb.StringProperty(indexed=True)
date = ndb.DateTimeProperty(auto_now=True)
@yne
yne / upnp_port.c
Created Mar 12, 2017
UPNP port forwarding managment
View upnp_port.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <ctype.h>
#include "miniwget.h"
#include "miniupnpc.h"
#include "upnpcommands.h"
You can’t perform that action at this time.