Skip to content

Instantly share code, notes, and snippets.

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

@exocode
exocode / kicad-cheat-sheet.md
Created April 6, 2019 20:18
KiCad short manual and cheat sheet

Flow

  1. Design Circuit
  2. Create Symbols (library editor)
  3. Schematic capture (eeschema)
  4. Create footprints (footprint editor)
  5. Generate Netlist (cvpcb)
  6. Board layout (pcbnew)
  7. Production (gerbview)
  8. Generate BOM (Digi-Key)
@jpswade
jpswade / SqliteTrait.php
Created August 1, 2021 10:35
Laravel - no such function: CONCAT sqlite
<?php
namespace App\Traits;
use Illuminate\Database\SQLiteConnection;
use Illuminate\Support\Facades\DB;
trait SqliteTrait
{
protected static function setUpSqlite(): void
@amalmurali47
amalmurali47 / backup_digitalocean.md
Last active April 24, 2024 21:33
Backup DigitalOcean droplet locally

DigitalOcean does not provide a way to download a snapshot of your droplet locally. You can use rsync to accomplish this instead.

On your local machine, assuming you have added your-server in your SSH config:

rsync -aAXHv --append-verify --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} your-server:/
  • -a : archive mode (all files, with permissions, etc.)
  • -A : preserve ACLs/permissions (not included with -a)
@IamAdiSri
IamAdiSri / Windows SSH Setup.md
Created January 3, 2019 09:50
Setup Windows to accept SSH connections and Tunneling

Windows SSH Setup

The steps to enable both SSH and tunneling/port forwarding are as follows:

  1. Open Settings > Update and Security > For Developers.
  2. Click on the radio button for Developer mode; this will open up your system's port 22 and allow the SSH broker to start listening for incoming connections.
  3. If you just switched to Developer mode, restart your computer, and then follow step 1 again.
  4. Under Device discovery turn on the option labeled Make your device visible to USB connections and your local network.
  5. Under Device discovery turn on the option labeled User OpenSSH (Beta) server for remote deployment.
@IvoPereira
IvoPereira / pwaDetector.js
Last active April 24, 2024 21:31
Detect if a PWA is installed (iOS Standalone, Trusted Web App, Chrome PWA)
function isPWA() {
return window.navigator.standalone == true || // iOS PWA Standalone
document.referrer.includes('android-app://') || // Android Trusted Web App
["fullscreen", "standalone", "minimal-ui"].some(
(displayMode) => window.matchMedia('(display-mode: ' + displayMode + ')').matches
) // Chrome PWA (supporting fullscreen, standalone, minimal-ui)
}
console.log(isPWA()) // true

Remote Development in Zed

At Zed we believe that great things are built by great people working together. We have designed Zed to help every individual work faster and to help teams of people work together more effectively.

Remote development allows you to launch a headless version of Zed on a development server, so that you and your team can edit projects without cloning them locally.

NOTE remote development is at very early stage of preview release with a number of limitations. Notably, you cannot currently use Zed’s terminal remotely, setup is very manual still, and we do not have the ability to install extensions on the headless instances of zed. If you’d like to try it out please reach out to hi@zed.dev and ask to be added to the feature flag.

Getting started with remote development

  • Make sure Zed is v0.133.0 or later (cmd-shift-p About)
@douglas
douglas / update_git_repos.sh
Created October 14, 2011 15:04
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@butageek
butageek / windows_activation.md
Last active April 24, 2024 21:24
Activate Windows for free

For Windows 10

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:

@SoabY
SoabY / JetBrains products Activation code until 15 May 2024
Created October 1, 2023 08:04
JetBrains products Activation code until 15 May 2024
8Z6IT0PIZH-eyJsaWNlbnNlSWQiOiI4WjZJVDBQSVpIIiwibGljZW5zZWVOYW1lIjoiSHVuYW4gTm9ybWFsIFVuaXZlcnNpdHkiLCJhc3NpZ25lZU5hbWUiOiJTdGFyayB6aGFuZyIsImFzc2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