Skip to content

Instantly share code, notes, and snippets.

@FreddieOliveira
FreddieOliveira / docker.md
Last active January 1, 2025 01:39
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@graydon
graydon / country-bounding-boxes.py
Created April 23, 2014 00:03
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@ananis25
ananis25 / test.py
Created August 23, 2024 11:13
sqlmesh-repro-duckdb-normalization
import os
import duckdb
from sqlmesh.core.config import (
Config,
GatewayConfig,
ModelDefaultsConfig,
DuckDBConnectionConfig,
)
from sqlmesh.core.context import Context
from sqlmesh.core.config.format import FormatConfig
@Ircama
Ircama / LgMagicRemoteKeys.md
Last active January 1, 2025 01:15
Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

This procedure allows substituting one or both Netflix and Amazon keys of the Magic Remote Control Unit with other apps or TV control menus of the webOS LG TV.

Netflix and Amazon keys can be found just over the Red-Green-Yellow-Blue color buttons of such remote.

Assumption for this procedure is that you accept to uninstall the apps related to the keys to be substituted. Example: if you want to replace the Netflix key, you need to uninstall Netflix (possibly, you are not using Netflix if you do not need such key).

To uninstall Netflix or Amazon Prime, press the Home key of the Magic Remote, select the "LG Content Store" app, press "APP" at the top of the screen, press "My Apps", press the "Rem

@snowclipsed
snowclipsed / CyberpunkPerlin.tsx
Created December 31, 2024 22:20
Perlin Noise and Terrain Generation using ASCII/UTF-8
import React, { useState, useEffect, useCallback, useRef } from 'react';
type ColoredChar = {
char: string;
color: string;
};
const defaultConfig = {
scale: 0.05,
@snowclipsed
snowclipsed / CyberpunkLorenz.tsx
Last active January 1, 2025 01:14
3D Lorenz System Simulation rendered using ASCII/UTF-8 in React
import React, { useState, useEffect, useCallback, useRef } from 'react';
/**
* Represents a point in 3D space within the Lorenz system.
*/
interface Point {
x: number;
y: number;
z: number;
}
@ethanmdavidson
ethanmdavidson / gradle_tests_report.gradle.kts
Created February 9, 2021 15:18
Fancy gradle test result logging, in kotlin
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import groovy.time.TimeCategory
import java.util.Date
/**
* based on the groovy code by lwasyl:
* https://gist.github.com/lwasyl/f5b2b4ebe9e348ebbd8ee4cb995f8362
*/
var testResults by extra(mutableListOf<TestOutcome>()) // Container for tests summaries
@lopspower
lopspower / README.md
Last active January 1, 2025 01:07
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@adibhanna
adibhanna / tmux.conf
Last active January 1, 2025 01:02
tmux
#--------------------------------------------------------------------------
# Configuration
#--------------------------------------------------------------------------
# Use Vi mode
setw -g mode-keys vi
# Increase scrollback buffer size
set -g history-limit 10000