Skip to content

Instantly share code, notes, and snippets.

View gutierri's full-sized avatar

Gutierri Barboza gutierri

View GitHub Profile
@veganaize
veganaize / Game-Design.md
Last active December 12, 2024 17:34
Game / Design
@assimilat
assimilat / pam_modules.list
Created October 22, 2021 19:10
list_of_pam_modules
https://github.com/nuvious/pam-duress
A Pluggable Authentication Module (PAM) which allows the establishment of alternate passwords that can be used to perform actions to clear sensitive data, notify IT/Security staff, close off sensitive network connections, etc if a user is coerced into giving a threat actor a password.
https://github.com/uber/pam-ussh
uber's ssh certificate pam module
https://github.com/Yubico/yubico-pam
Yubico Pluggable Authentication Module (PAM)
https://github.com/hamzasood/pam_touchid
@jeb5
jeb5 / Youtube Subs to OPML.js
Last active November 9, 2024 02:13
Youtube Subscriptions to RSS/OPML
const channels = [...document.querySelectorAll("#main-link.channel-link")].map(e => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
const feed = "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
return [feed, channelName];
});
if (channels.length == 0) {
alert("Couldn't find any subscriptions");
} else {
console.log(channels.map(([feed, _]) => feed).join("\n"));
@farmerbb
farmerbb / scrcpy-desktop-mode.sh
Last active December 13, 2024 16:22
Pseudo-desktop mode using scrcpy
#!/bin/bash
show-help() {
BASENAME=$(basename "$0")
echo "Usage: $BASENAME [device-name] [optional-resolution] [optional-density]"
exit 1
}
[[ $1 = "-h" || $1 = "--help" ]] && show-help
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 7, 2025 12:26
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

@oofnikj
oofnikj / answerfile
Last active April 4, 2025 19:46
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 5, 2025 08:24
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@leisurelicht
leisurelicht / admin.py
Last active August 20, 2024 00:44
Make all fields readonly for Django Admin
class OpsIPInfoAdmin(admin.ModelAdmin):
def get_readonly_fields(self, request, obj=None):
# make all fields readonly
readonly_fields = list(
set([field.name for field in self.opts.local_fields] +
[field.name for field in self.opts.local_many_to_many])))
if 'is_submitted' in readonly_fields:
readonly_fields.remove('is_submitted')
@brutus
brutus / Makefile
Created August 16, 2017 13:22
Makefile for Python projects
# Python Project
#
# Some targets to lint your code, run tests, builds and do some cleanup.
# Works fine with tox and Travis, etc.
#
# This setup assumes that you take care of the virtual environment setup
# yourself and that the needed requirements are installed. And also that
# you configure your tools. So edit your own `setup.cfg` or `.tox.ini`
# with the settings needed for the tools.
#
@sirodoht
sirodoht / migrate-django.md
Last active April 7, 2025 18:34
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then: