Skip to content

Instantly share code, notes, and snippets.

View gauravssnl's full-sized avatar
😸
use code::latest ;

GAURAV gauravssnl

😸
use code::latest ;
View GitHub Profile
@AngelaCooljx
AngelaCooljx / Guide-of-Lindroid.md
Last active October 28, 2025 08:41
A guide on how to use Lindroid

An Unofficial Guide of Lindroid

Official Guide: https://t.me/linux_on_droid/1263

What is Lindroid?

Lindroid is an Android app that lets you run Linux in a container, with support for hardware-acceleration. Official group: https://t.me/linux_on_droid

How to Compile Lindroid?

  1. Ensure your device has the necessary configurations:
    • Obtain a usable device configuration, kernel source, and ROM source code for your device.
@SleepingSoul
SleepingSoul / building-gstreamer-from-source.md
Last active March 9, 2024 21:41
Building GStreamer from source on Linux device

Hardware used: Orange Pi 4 LTS

OS: Armbian Jammy

Should work everywhere on Debian or Ubuntu

Step 1: Install build tools (meson, ninja)

Usually gstreamer uses newer version of meson then available in apt packages, so we need to also build and install it from source. This is super easy. Here I am using 1.2.3 version that is currently latest, but you can use any other version.

sudo apt install pip
type Event:
wait()
set()
type Link:
get(ptr: Ptr):
if LOAD(ptr, Acquire) |value|:
return value
e = Event{}
public static void main(String[] argv) throws InterruptedException {
Executors.newVirtualThreadPerTaskExecutor().
execute(() -> {
System.out.print("StringList: " + stringList);
});
stringList = List.of("ZZ", "XX", "LL", "DDD");
}
public static void main(String[] argv) throws InterruptedException {
Executors.newVirtualThreadPerTaskExecutor().
execute(() -> {
System.out.print("StringList: " + stringList);
});
stringList = List.of("ZZ", "XX", "LL", "DDD");
}
@lobre
lobre / zig_type_system.md
Last active December 3, 2025 12:41
Zig type system illustrated using ascii diagrams

Zig Type System

Zig aims to be a simple language. It is not easy to define what simple exactly means, but zig is also a low-level programming language that aims for c-compatibility. To reach this goal, it needs good semantics in its type system so that developers have a complete toolbox to manipulate data.

So types in zig are composable, but this can become rapidly overwhelming. See those examples. Are you able to understand them at a glance, as soon as you read them?

*const ?u8
?*const u8
*const [2]u8
@irh
irh / variadic_closures.rs
Created September 29, 2022 08:44
An example of implementing a method that accepts closures with different arguments.
// An example of implementing a method that accepts closures with different input arguments.
// The trick to avoid Rust complaining about conflicting implementations is to specify
// the arguments for each specialization in a separate type parameter.
// See https://geo-ant.github.io/blog/2021/rust-traits-and-variadic-functions/
fn main() {
let mut foo = Foo::default();
foo.add_fn(|| 0);
foo.add_fn(|a| a);
@dabeaz
dabeaz / lala.py
Last active August 20, 2024 07:20
Some lambdas
# Author: David Beazley (https://www.dabeaz.com)
# Twitter: @dabeaz
from functools import reduce
run = lambda s: reduce(lambda *_:..., iter(lambda s=[s]:
(_:=s.pop()(),s.append(_))[0], None))
const = lambda v,c : lambda: c(v)
add = lambda x,y,c : lambda: c(x+y)
mul = lambda x,y,c : lambda: c(x*y)
@willmcgugan
willmcgugan / timers.css
Created August 18, 2022 15:13
Timers example
TimerWidget {
layout: horizontal;
height: 5;
background: $panel-darken-1;
border: tall $panel-darken-2;
margin: 1;
padding: 0 1;
transition: background 200ms linear;
}