Skip to content

Instantly share code, notes, and snippets.

@FreddieOliveira
FreddieOliveira / docker.md
Last active May 6, 2024 15:28
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

@maxivak
maxivak / 00.md
Last active May 6, 2024 15:27
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@brianfoshee
brianfoshee / flag-emoji.js
Last active May 6, 2024 15:26
Generate a Country's Flag Emoji given its 2 letter Country Code
// Generate a Country's Flag Emoji given its 2 letter Country Code
// https://emojipedia.org/flags/
function flagEmojiFromCountryCode(code) {
if (code.length != 2) {
// Must be ISO 3166-1 alpha-2
throw new Error(`Country Code "${code}" must be 2 characters`);
}
var base = 0x1F1E6 // hex of unicode code point for 🇦, "Regional Indicator Symbol Letter A"
var a = 'a'.charCodeAt(0) // => 97. Used for calculating unicode offsets from base.
@fabiomagno
fabiomagno / lista oficial.m3u
Last active May 6, 2024 15:25
lista oficial.m3u
#EXTM3U
#PLAYLISTV: pltv-logo="http://files.fabiomagno.webnode.com/200000054-6d18c6e133-public/.facebook_1491010981683.jpg" pltv-name="FABIO MAGNO" pltv-description="LISTA DE FILMES, SERIES, ANIMES, DESENHOS E VARIEDADES" pltv-cover="http://www.cepe.com.br/images/miv/CiaEditora
#EXTINF:-1 tvg-logo="http://i.imgur.com/PysT8xnh.jpg" group-title="ATUALIZAÇÕES DO DIA", ARROW T6|EP12 (LEG)
http://cdn1.ntcdn.us/content/httpdelivery/arrow/06leg/12-ALTO.mp4?STANIPTV
#EXTINF:-1 tvg-logo="http://www.mmfilmes.tv/wp-content/uploads/2018/02/p14477551_p_v8_aa-200x300.jpg" group-title="ATUALIZAÇÕES DO DIA",THE SOUND - DUB - HD (2017)
http://s.vstreaming.net/movies/osom-dub-720p.mp4?STANIPTV
#EXTINF:-1 tvg-logo="http://www.mmfilmes.tv/wp-content/uploads/2018/02/unnamed-file-91-200x300.jpg" group-title="ATUALIZAÇÕES DO DIA",BATMAN: GOTHAM BY GASLIGHT - DUB - HD (2018)
http://s.vstreaming.net/movies/batmangaslight-dub-720p.mp4?STANIPTV
@xuwang
xuwang / vault-secrets-the-simple-way.md
Created February 22, 2020 20:37
Vault Secrets The Simple Way

Vault Secrets the Simple Way

This article introduces a simple way of working with Hashicorp Vault key-value secrets engine.

Prerequisites

You should have a running Hashicorp/Vault service and Vault command available.

Here is a quick way to install a Vault dev server.

@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active May 6, 2024 15:20
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@Yukaii
Yukaii / README.md
Last active May 6, 2024 15:27
g0v logbot simple navigation

g0v logout simple navigation

Add the bottom right buttons for more sensible navigation.

スクリーンショット 2024-05-06 夜中11 17 17

Installation

Install Greasemonkey

@unoexperto
unoexperto / patch_apk_for_sniffing.md
Last active May 6, 2024 15:19
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d net.flixster.android-9.1.3@APK4Fun.com.apk
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@wojteklu
wojteklu / clean_code.md
Last active May 6, 2024 15:19
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@williamn
williamn / gist:2894205
Created June 8, 2012 07:24 — forked from JonathanTron/gist:361875
Steps to mirror a Git repository
# go to your repository
cd my_project
# check your existing remote
git remote -v
# origin git@mydomain.tld:my_project.git (fetch)
# origin git@mydomain.tld:my_project.git (push)
# Add a new remote, a github.com private repository for example
# the --mirror flag is what's different from a simple new remote