Skip to content

Instantly share code, notes, and snippets.

View lucasfernandodev's full-sized avatar
👋

Lucas Fernando lucasfernandodev

👋
View GitHub Profile
@lucasfernandodev
lucasfernandodev / initialize
Created February 23, 2025 13:17
Script to start chroot linux
#!/data/data/com.termux/files/usr/bin/sh
termux-wake-lock
killall -9 virgl_test_server virgl_test_server_android
pkill -f com.termux.x11;
## Start Termux X11
am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity >> $HOME/chroot.log 2>&1 &
su -c "setenforce 0";
@lucasfernandodev
lucasfernandodev / how-removing-zen-browser-padding-and-margin.txt
Last active September 14, 2024 17:29
How removing zen browser padding and margin
1. Navigate to `about:config`.
2. Search for `toolkit.legacyUserProfileCustomizations.stylesheets` and toggle it to `true` (by double-clicking on it).
3. Find the Zen profile folder.
4. Inside the Zen profile folder, create a new folder named `chrome`.
5. Inside the `chrome` folder, create two new files: `userContent.css` and `userChrome.css`.
6. Open `userChrome.css` using a text editor and paste the following code:
```css
:root:not([inDOMFullscreen="true"]) #tabbrowser-tabbox #tabbrowser-tabpanels .browserSidebarContainer {
border-radius: unset!important;
@lucasfernandodev
lucasfernandodev / mr.sh
Last active February 2, 2024 07:12
Script for starting sshfs in background for coding using code-serve
#!/data/data/com.termux/files/usr/bin/bash
#termux-wake-lock
SSH_CONFIG="~/.ssh/config";
LOG_OUTPUT=".sshfs-log.txt";
DEST_FOLDER="$PREFIX/var/www/.remote";
mr(){
mkdir -p $DEST_FOLDER
@lucasfernandodev
lucasfernandodev / AdbCommands
Created January 31, 2024 23:00 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@lucasfernandodev
lucasfernandodev / bytesToSize.js
Created October 7, 2019 02:21 — forked from lanqy/bytesToSize.js
JavaScript To Convert Bytes To MB, KB, Etc
// from http://scratch99.com/web-development/javascript/convert-bytes-to-mb-kb/
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return 'n/a';
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
if (i == 0) return bytes + ' ' + sizes[i];
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
};