Skip to content

Instantly share code, notes, and snippets.

@kimusan
kimusan / resources.md
Created June 16, 2021 06:47 — forked from muff-in/resources.md
A curated list of Assembly Language / Reversing / Malware Analysis -resources
@keilmillerjr
keilmillerjr / clone_root_disk.md
Last active March 3, 2025 13:05
Cloning a Root Disk (Linux)

Cloning a Root Disk (Linux)

Preface

You need to create a bootable live disk to clone your disk. You can not copy a partition that is mounted. If you do not have internet access, use gparted. Otherwise, it might be better to use your operating systems live installer, such as Manjaro. We can download gparted and still have things like a web browser incase we get stuck. We will be using the Manjaro live disk for this guide.

Create a bootable live disk

  1. Download Manjaro.
  2. Insert USB disk.
@andrebrait
andrebrait / keychron_linux.md
Last active May 13, 2025 04:22
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@andrelugomes
andrelugomes / .my_setup_oh-my-zsh
Last active January 7, 2025 18:01
Install oh-my-zsh, plugins and theme
- ok-my-zsh
- p10k.zsh : custon
- .zshrc : Plugins
@joaoescribano
joaoescribano / binance.py
Created July 25, 2019 16:44
Binance login + wallet check + captcha solver
#!/usr/bin/env python3
# Usage:
# ./binance.py <email> <senha> <otp> <wallet to test json>
from solver import PuzleSolver
import calendar
import json
import os
import pyotp
@OndraZizka
OndraZizka / switchHeadphones.sh
Last active May 29, 2024 13:43
Bluetooth headset - switch between quality sound + no mic (A2DP) and crappy sound and mic (HSP/HFP)
#!/bin/bash
#### Restart Bluetooth
if [ "$1" == "resetBT" ] ; then
sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth;
exit;
fi;
#### Toggle listen/speak
if [ "$1" == "" -o "$1" == "toggle" ] ; then
@nishitpatel
nishitpatel / Readme.text
Created April 10, 2017 13:37
Add GitIgnore to existing Repository.
Step 1: Mannually add git ignore file on git server with predefine templates for ex. if you are adding gitignore file in
iOS project than user Object-C template.
Step 2: After successfully adding git ignore update your local branch code with latest code.
Step 3: While Merging master code with local code may be you will see VIM editor to add commit message. So for VIM editor
Just press ESC -> : -> x it will close VIM editor. After than perform
Git add .
Git commit -m "COMMIT MESSAGE"
Git Push origin "BRANCH_NAME"
Step 4: After you run your project you will still see the untracked files. To remove those files perform following setps.
May be in your repository you will see any other file so below path is just for reference please don't take it seriousally
@P7h
P7h / tmux_vs_screen.md
Last active April 3, 2025 19:07
tmux vs screen commands

tmux vs. screen commands


Action tmux screen
start a new session tmux
tmux new
tmux new-session
screen
start a new session with a name tmux new -s name screen -S name
re-attach a detached session tmux attach
tmux attach-session
screen -r
re-attach a detached session with a name tmux attach -t name
tmux a -t name
screen -r name
re-attach an attached session (detaching it from elsewhere) tmux attach -dtmux attach-session -d screen -dr
@kachayev
kachayev / dijkstra.py
Last active March 4, 2025 23:42
Dijkstra shortest path algorithm based on python heapq heap implementation
from collections import defaultdict
from heapq import *
def dijkstra(edges, f, t):
g = defaultdict(list)
for l,r,c in edges:
g[l].append((c,r))
q, seen, mins = [(0,f,())], set(), {f: 0}
while q:
@flavianmissi
flavianmissi / django_update_view.py
Created October 10, 2011 12:37
Django UpdateView sample
#views.py
from django.views.generic import UpdateView
class UpdateBook(UpdateView):
model = Book
form_class = BookForm
template_name = 'create_form.html'
success_url = '/books/'