Skip to content

Instantly share code, notes, and snippets.

@rubenhorn
rubenhorn / TermuxServer.md
Last active October 31, 2025 13:42
Termux Server

Initial setup

(See also the Termux Wiki)

# Install AutoSSH, OpenSSH and FTP server and tmux
pkg upgrade
pkg install autossh openssh openssh-sftp-server tmux
# Set password for initial connection
passwd
# Find local IP address of device
ifconfig | grep -o 192[0-9\.]*
@catalinmiron
catalinmiron / index.js
Created December 15, 2021 08:37
Starter Code - ScrollToIndex tutorial
import { Entypo, Feather } from '@expo/vector-icons';
import faker from 'faker';
import * as React from 'react';
import { Dimensions, FlatList, Text, TouchableOpacity, View } from 'react-native';
const { width, height } = Dimensions.get('screen');
faker.seed(10);
const data = [...Array(20).keys()].map(() => ({
@diegopacheco
diegopacheco / pbpaste-pbcopy-ubuntu.md
Last active September 25, 2025 15:50
pbpaste && pbcopy for Ubuntu Linux 20.04

Install

sudo apt-get install xclip -y

Create Alias

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

Try out

@FreddieOliveira
FreddieOliveira / docker.md
Last active October 28, 2025 08:35
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

@miladd3
miladd3 / remCalc.ts
Last active July 9, 2025 17:41
Javascript px to Rem function
/**
* Converts pixel size to rem and accepts the base as second argument. default base is 16px
*
* @param {number|string} px
* @param {number} base
* @return {string}
*/
const remCalc = (px: number | string, base: number = 16) => {
const tempPx = `${px}`.replace('px', '')
@SkYNewZ
SkYNewZ / Caddyfile
Created October 7, 2020 17:13
Example Caddyfile for using as load balancer
{
# Enable Debug mode
debug
# Disable admin API
admin off
}
localhost {
# https://caddyserver.com/docs/caddyfile/directives/push
@umanghome
umanghome / publish.yml
Last active June 20, 2025 13:27
GitHub Action: Generate a build and push to another branch
# .github/workflows/publish.yml
name: Generate a build and push to another branch
on:
push:
branches:
- master # Remove this line if your primary branch is "main"
- main # Remove this line if your primary branch is "master"
jobs:
@JosePedroDias
JosePedroDias / debug_cookie_set.js
Created July 13, 2020 18:02
tampermonkey userscripts for cookies and localStorage
@DerFichtl
DerFichtl / tampermonkey-adblock-block.md
Last active September 11, 2025 15:57
Tampermonkey Adblock Script - This Ad-Blocker is running on pages with Adblock-detectors and can remove or click elements to cleanup before you start browsing.
layout title published tags
post
Tampermonkey ad-blocker
true
adblock
tampermonkey
browser

This ad-blocker script for Tampermonkey won't trigger an adblock-block / adblock-detector script and so you could use it for pages that are annoying you with "please turn of your adblock" messages. It's just hiding the ads and don't try to intercept the requests or remove the ads at all. So it don't make the websites faster, but it makes them cleaner and easier to read.

This script is not a generic solution and has to be configured for every website it should clean up. I don't provide configs for pages, just use your browser developer-tools to find the elements you want remove or click.

@sidneydemoraes
sidneydemoraes / mysqldump
Created August 2, 2019 17:20
Mysqldump client for DBeaver with Docker (without installing mysql-client)
#!/bin/sh
# File location: /usr/local/bin/mysqldump
# File permission: +x
docker run --rm mysql:latest /usr/bin/mysqldump