Skip to content

Instantly share code, notes, and snippets.

@jherkenhoff
jherkenhoff / build_libqalculate.sh
Created December 3, 2021 16:58
Script to build libqalculate using the android NDK
#!/bin/sh
export NDK=/home/$USER/Android/Sdk/ndk/23.1.7779620
export GMP_VERSION=6.2.1
export MPFR_VERSION=4.1.0
export XZ_VERSION=5.2.5
export GETTEXT_VERSION=0.21
export LIBICONV_VERSION=1.16
export ZLIB_VERSION=1.2.11
@hormesiel
hormesiel / Device.java
Last active May 29, 2024 11:47
How to get an Android device's serial number, visible to the user in "Settings > About phone/tablet/device > Status > Serial number".
import android.os.Build;
import java.lang.reflect.Method;
public class Device {
/**
* @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status
* > Serial number}, or {@code null} if the serial number couldn't be found
*/
public static String getSerialNumber() {
@rock3r
rock3r / giffify.py
Last active January 14, 2022 09:00
Giffify - easily create optimised GIFs from a video
#!/usr/bin/python
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
import argparse, sys, subprocess, tempfile