Skip to content

Instantly share code, notes, and snippets.

View rogeriopradoj's full-sized avatar
😀

Rogerio Prado de Jesus rogeriopradoj

😀
View GitHub Profile
@tenzap
tenzap / Readme.md
Last active October 26, 2023 17:55 — forked from cunneen/Readme.md
Install OpenGApps In Android Emulator (up to API31 / android 12 / S)

Introduction

This works to install OpenGApps into the Android Emulator

Features:

  • uses opengapps installer script (that we patch slightly)
  • linux only because we mount the ext2/4 disk images to modify them. Could be adapted for macos if you use hdiutil instead of kpartx and have installed tools to mount ext2/4 filesystems on macos
  • root permissions mandatory to mount disk images and enter chroot
  • removes verity/verified-boot from the virtual device (so that the AVD can boot, otherwise it would not boot because we didn't update the dm_params)
@ssky87
ssky87 / entware zerotier
Created February 6, 2021 01:40 — forked from cretudorin/entware zerotier
LibreElec / CoreElec ZeroTier
// install entware
installentware // for coreelec
wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | sh // for libreelec rasbperry 3
// update && install zerotier
opkg update
opkg install zerotier
// start the daemon
@rogeriopradoj
rogeriopradoj / jupyter_cell_notify.py
Last active September 30, 2020 19:26 — forked from tamsanh/jupyter_cell_notify.py
Generate and play a sound in Jupyter Notebook when then cell is run. Useful as notification when a long-running cell is done.
from IPython.lib.display import Audio
import numpy as np
framerate = 4410
play_time_seconds = 3
t = np.linspace(0, play_time_seconds, framerate*play_time_seconds)
audio_data = np.sin(2*np.pi*300*t) + np.sin(2*np.pi*240*t)
Audio(audio_data, rate=framerate, autoplay=True)
@brainfucksec
brainfucksec / bash.bashrc
Last active March 8, 2024 07:25
Termux bash.bashrc
######################################
#
# Termux bash.bashrc
# by brainf+ck
#
# Last modified: 2022/06/30
#
######################################
#### Global ##########################
@beancurd1
beancurd1 / autostart.sh
Created March 8, 2020 03:19
CoreELEC or LibreELEC autostart.sh to auto start scripts upon reboot
# this located in /storage/.config/autostart.sh on a CoreELEC box, run chmod +x to make it executable
# use nohup to run the script in the backgroud
# nohup /storage/freemyip/updateDynDNS.sh &
# use this to run once off tasks
(
# pause few seconds to wait for network & time services to start
sleep 5
DT=$(date +"%m-%d-%Y, %r")
echo "Box rebooted on $DT, running tasks in autostart.sh" >> /storage/freemyip/DynDNSUpdate.log
@markus2120
markus2120 / zt_VPN.md
Last active January 17, 2023 05:51
Route all traffic with a raspberry pi like a VPN
@realies
realies / adminer autologin
Last active April 13, 2020 21:40 — forked from iarp/adminer autologin
A way to allow direct login to adminer
<?php
$_GET["username"] = "";
$_GET["db"] = "database";
function adminer_object() {
class AdminerAutoLogin extends Adminer {
function credentials() {
return array("127.0.0.1", "username", "password");
}
function login($login, $password) {
return true;
@mohamadaliakbari
mohamadaliakbari / ubuntu-run-dhclient-on-startup.md
Last active November 6, 2023 19:33
Run dhclient on Startup in Ubuntu 18.04

dhclient is the Dynamic Host Configuration Protocol (DHCP) Client one would use to allow a client to connect to a DHCP server.

$ sudo nano /etc/rc.local

#!/bin/bash
dhclient
exit 0
@yougg
yougg / proxy.md
Last active April 7, 2024 04:02
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)