Skip to content

Instantly share code, notes, and snippets.

@mikklfr
mikklfr / These Alexiane.EXCEL.yaml
Last active January 14, 2022 13:18
These Alexiane Excel
name: These Alexiane
description: These Alexiane Excel
host: EXCEL
api_set: {}
script:
content: |-
OfficeExtension.config.extendedErrorLogging = true;
$("#run").click(() => tryCatch(run));
@mikklfr
mikklfr / ffmpeg-wrapper
Created October 31, 2021 11:32 — forked from BenjaminPoncet/ffmpeg-wrapper
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support (Installation instructions in 1st comment)
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
@mikklfr
mikklfr / flash.sh
Created April 4, 2021 06:33 — forked from diagprov/flash.sh
Flashing Android By Hand
# this comes from the Apache2-Licensed AOSP script.
# filenames in this script represent the Pixel 3 ("blueline")
# first Android 11 (RP1A) release.
# This didn't actually work, in my experience, but an almost
# identical (save the filenames) process worked for Android 9-10.
# you should update your SDK tools first.
if ! [ $($(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\.//g' ) -ge 2802 ]; then
echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html"
exit 1
/*
Please add Neatle library to your project https://github.com/inovait/neatle
Writing sample :
.write(UUID.fromString(AWOX_AL_BC7_LIGHT_COLOR_SERVICE), UUID.fromString(AWOX_AL_BC7_LIGHT_COLOR_CHARAC), new InputSource() {
@Override
public void open() throws IOException {
}
@mikklfr
mikklfr / memorize-app.js
Created January 7, 2018 14:46
Picture support in memorize-app.js
/**
* Created by ohayon_m on 17/08/15.
*/
define(["activity/sample-ressources", "activity/palettes/template-palette", "activity/palettes/size-palette", "activity/lz-string", "sugar-web/graphics/journalchooser", 'sugar-web/datastore'], function (SampleRessources, templatePalette, sizePalette, lzString, chooser, datastore) {
console.log("INIT")
var FOUND_COLOR = "#84f060";
var MODE_CLASSIC = "classic";
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mikkl.sugarizertest">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
PackageManager p = getPackageManager();
ComponentName cN = new ComponentName(this, FakeLauncherActivity.class);
p.setComponentEnabledSetting(cN, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
Intent selector = new Intent(Intent.ACTION_MAIN);
selector.addCategory(Intent.CATEGORY_HOME);
startActivity(selector);
p.setComponentEnabledSetting(cN, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
<string name="cgu" formatted="false"> <![CDATA[
<h1>Mentions légales</h1>
L’application est la propriété du Commissariat Général du Pavillon de la France Milan 2015 dont l’adresse est la suivante : 12, rue Henri Rol-Tanguy / TSA 20002, 93555 Montreuil cedex\n
\n
<b>Directrice éditorial</b>\n
Margot Arrault, responsable de la communication du Pavillon de la France.\n
\n
<b>Conception</b>\n
Epitech\n
\n
[
{
"class": "mytwitter.grails.Tweet",
"id": 7,
"date": "2015-04-01T14:58:36Z",
"isFavorite": false,
"isResponse": false,
"isRetweet": false,
"message": "salut les aminches",
"photoB64": null,
@mikklfr
mikklfr / uuid
Created March 5, 2015 15:30
uuid
static final char[] hexArray = "0123456789ABCDEF".toCharArray();
private static String bytesToHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for ( int j = 0; j < bytes.length; j++ ) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
}
return new String(hexChars);
}