Skip to content

Instantly share code, notes, and snippets.

@licensed
licensed / clone_root_disk.md
Created December 19, 2022 01:42 — forked from keilmillerjr/clone_root_disk.md
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.
@licensed
licensed / .my_setup_oh-my-zsh
Created November 18, 2021 22:15 — forked from andrelugomes/.my_setup_oh-my-zsh
Install oh-my-zsh, plugins and theme
- ok-my-zsh
- p10k.zsh : custon
- .zshrc : Plugins
@licensed
licensed / switchHeadphones.sh
Created November 13, 2021 00:24 — forked from OndraZizka/switchHeadphones.sh
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
@licensed
licensed / keychron_linux.md
Created November 8, 2021 20:18 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux (+ Bluetooth fixes)

Here is the best setup (I think so :D) for Keychron + Linux

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

In order to change this, you need to change the fnmode parameter for the hid_apple kernel module. Here's some documentation on it, but a quick summary can be found below:

@licensed
licensed / git-update-fork.sh
Created April 19, 2020 23:38 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
@licensed
licensed / binance.py
Created March 19, 2020 03:03 — forked from joaoescribano/binance.py
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
@licensed
licensed / Readme.text
Created January 18, 2020 14:37 — forked from nishitpatel/Readme.text
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
@licensed
licensed / paises-gentilicos-google-maps.json
Created August 10, 2018 22:02 — forked from jonasruth/paises-gentilicos-google-maps.json
JSON com lista de Países em pt-BR e seus respectivos Gentílicos, Siglas e Nome Internacional - Possui todos os países do Google Maps
[ { "gentilico" : "afegãne",
"nome_pais" : "Afeganistão",
"nome_pais_int" : "Afghanistan",
"sigla" : "AF"
},
{ "gentilico" : "sul-africana",
"nome_pais" : "África do Sul",
"nome_pais_int" : "South Africa",
"sigla" : "ZA"
},
@licensed
licensed / django_update_view.py
Created July 13, 2018 18:06 — forked from flavianmissi/django_update_view.py
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/'