Skip to content

Instantly share code, notes, and snippets.

@Miouyouyou
Miouyouyou / MopubFalcon.java
Last active December 9, 2015 23:11
Quick and dirty AdFalcon adapter for MoPub
package your.wonderful.package.name
/* First version : 2015-12-09
To instruct MoPub to use this adapter, You'll have to
- Open the 'Networks' tab
- Add a 'Custom Native Network'
- Put the full class name in 'Custom Class Event'
Example : 'your.wonderful.package.name.MopubFalcon'
When testing, be aware of the geographical restrictions you put on this
network. If you removed geographical restrictions, put them back again
@Miouyouyou
Miouyouyou / MopubBrain.java
Created December 9, 2015 23:58
Mopub adapter used to load AppBrain adds
package your.wonderful.packagename;
/* First version : 2015-10-10
That's quick and very dirty way to add AppBrain ads through MoPub.
Remember to add the appropriate rights in your local
AndroidManifest.xml
The rights are (inside <application>) :
<!-- AppBrain SDK -->
<activity
@Miouyouyou
Miouyouyou / steam-idler.c
Last active September 14, 2022 16:59
SteamIdler
/* A really dumb Steam Idler in C for Linux systems.
* Might work on Mac OS too but I never tested it.
*
* /!\ You need to have Steam currently running on the computer
* ⁻⁻⁻ executing this software.
*
* Short version :
* gcc -o SteamIdler steam-idler.c libsteam_api.so
*
* Long version :
@Miouyouyou
Miouyouyou / badge_list_parser.rb
Last active June 29, 2017 13:26
Steam Idler (Quick and Dirty version)
# -*- coding: utf-8 -*-
require 'nokogiri'
badge_title_text = "詳細を表示"
document = Nokogiri.parse(File.read("test.html"))
rows = document.css(".badge_row")
games = {}
rows.each {|row|
play_button = row.css(".btn_green_white_innerfade").first
@Miouyouyou
Miouyouyou / incomplete_generic_java_caller.c
Last active December 9, 2016 17:48
Random scriblings
enum java_return_types {
return_jobject,
return_jboolean,
return_jbyte,
return_jchar,
return_jshort,
return_jint,
return_jlong,
return_jfloat,
return_jdouble,
@Miouyouyou
Miouyouyou / init_window.c
Created December 15, 2016 07:55
A very ugly Wayland EGL OpenGL example
// gcc -o test init_window.c -I. -lwayland-client -lwayland-server -lwayland-client-protocol -lwayland-egl -lEGL -lGLESv2
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-client-protocol.h>
#include <wayland-egl.h> // Wayland EGL MUST be included before EGL headers
#include "init_window.h"
#include "log.h"
#include <string.h>
@Miouyouyou
Miouyouyou / codepoint_to_utf8_seq.c
Last active May 2, 2023 17:28
A very dull UTF32 codepoint to UTF8 sequence converter (UTF-32 to UTF-8)
/* UTF-32 codepoint to UTF-8 sequence converter by Miouyouyou
*
* To the extent possible under law, the person who associated CC0 with
* this content has waived all copyright and related or neighboring
* rights to this content.
*
* You should have received a copy of the CC0 legalcode along with this
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*
*/
@Miouyouyou
Miouyouyou / Linux_DRM_OpenGLES.c
Last active May 31, 2024 03:27
An example, inspired by Rob Clark "kmscube.c" that uses Linux Direct Rendering Manager ( DRM ) and EGL to create an OpenGL ES 2 context. This is a standalone example, that just clears the screen with a blueish color. Usable with Rockchip DRM drivers and Mali Wayland/DRM userspace drivers.
// gcc -o drmgl Linux_DRM_OpenGLES.c `pkg-config --cflags --libs libdrm` -lgbm -lEGL -lGLESv2
/*
* Copyright (c) 2012 Arvin Schnell <arvin.schnell@gmail.com>
* Copyright (c) 2012 Rob Clark <rob@ti.com>
* Copyright (c) 2017 Miouyouyou <Myy> <myy@miouyouyou.fr>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
@Miouyouyou
Miouyouyou / quick_egl_x11_test.c
Created July 2, 2017 03:38
Quick EGL X11 Display test
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <X11/X.h>
void LOG(char const * __restrict const message)
{
fprintf(stderr, "%s\n", message);
@Miouyouyou
Miouyouyou / SendMeTheForm.gs
Last active July 28, 2017 07:37
Send Google Form content by email when sent
/* VERY VERY basic code that does the job */
/* Extracts answers from a provided FormResponse that creates a text String
containing :
-8<---
Question title
Provided answer
->8---