Skip to content

Instantly share code, notes, and snippets.

@Tydus
Tydus / howto-standalone-toolchain.md
Last active March 1, 2026 16:26
How to install Standalone toolchain for Android

HOWTO Cross compiling on Android

5W1H

What is NDK

NDK (Native Develop Toolkit) is a toolchain from Android official, originally for users who writes native C/C++ code as JNI library. It's not designed for compiling standalone programs (./a.out) and not compatible with automake/cmake etc.

What is Standalone Toolchain

"Standalone" refers to two meanings:

  1. The program is standalone (has nothing connect to NDK, and don't need helper scripts to run it)
  2. The toolchain is made for building standalone programs and libs, and which can used by automake etc.

(Optional) Why NDK is hard to use

By default, NDK uses android flavor directory structure when it's finding headers and libs, which is different from GNU flavor, so the compiler cannot find them. For Example:

@jemc
jemc / BigButton.qml
Last active August 5, 2023 09:26
Big Button example in QML using SVG and native layers
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtGraphicalEffects 1.0
Item {
height: 200
width: 200
@alan-mushi
alan-mushi / scrolling_form.c
Created July 11, 2014 12:38
This is a simple example of "scrolling" form with ncurses. It use "page" to allow forms with more fields than your window can print.
/*
* This is a simple example of "scrolling" form with ncurses.
* It use "page" to allow forms with more fields than your window can print.
*
* It prints a "label" (inactive field) and a regular field and let you
* "scroll" pages of the form.
*
* How to compile:
* gcc -o test scrolling_form.c -lform -lncurses
*/
@kovrov
kovrov / spinner_effect.qml
Created July 22, 2014 07:21
SpinnerEffect.qml
import QtQuick 2.2
import QtQuick.Window 2.2
Window {
color: "gray"
NumberAnimation {
target: fx
property: "angle"; from: Math.PI * 2; to: 0
@penk
penk / material-design.qml
Last active January 19, 2019 22:36
Material Design inspired style in QML
import QtQuick 2.0
import QtGraphicalEffects 1.0
Rectangle {
id: root
color: '#EEEEEE'
width: 960
height: 768
Item {
@thomd
thomd / ui-components.md
Last active September 30, 2021 13:14
UI Components #list #ui #components
@raidzero
raidzero / divvy.sh
Last active February 15, 2023 09:35
OS X Divvy emulation for EWMH-compliant (Unix-like) Window Managers
#!/bin/sh
DEST="$1"
if [ -z "$DEST" ]; then
echo "USAGE: $0 [location]"
echo -e "\nsupported locations: "
echo -e "\thalf-left, half-right"
echo -e "\tthird-left, third-middle, third-right"
echo -e "\tquarter-top-left, quarter-rop-right, quarter-bottom-left, quarter-bottom-right"
@roachhd
roachhd / README.md
Last active April 10, 2026 19:12
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@lanrat
lanrat / wmtt.sh
Created January 26, 2015 19:42
run nested window-manager
#!/usr/bin/env bash
# wmtt: wm testing tool
# built from the awmtt script
#Default Variables
#TODO make this arg passable
WM="openbox-session"
ME=$(basename ${0})
# Display and window size
D=1
@flaviut
flaviut / box-drawing.md
Last active March 4, 2026 17:45
Box Drawing characters with examples

Box drawing fun

A few boxes drawn with Unicode box drawing characters:

╔═╦═╗
╠═╬═╣
║ ║ ║
╚═╩═╝