Skip to content

Instantly share code, notes, and snippets.

View KR1470R's full-sized avatar
🇺🇦
fuck russia

KR1470R

🇺🇦
fuck russia
View GitHub Profile
@swedesjs
swedesjs / index.js
Last active June 17, 2021 20:08
Class Swearing-Detector
const test = (text) =>
preg_match_all(
new RegExp(
`
@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active April 25, 2024 04:03
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
@michaelkarrer81
michaelkarrer81 / pyenv.md
Last active April 19, 2024 18:50
[Install python versions] Install multiple python versions in linux with pyenv #pyenv #python #linux

Important links

Install pyenv for the user root

sudo su
curl https://pyenv.run | bash

# Load pyenv automatically by adding
# the following to ~/.bashrc:
@utdrmac
utdrmac / make_employees.py
Last active February 7, 2024 16:58
Multi-Threaded MySQL in Python
#!/usr/bin/python
import os, sys
import random
import time
import string
import mysql.connector
import threading
from mysql.connector import errorcode
@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@sibosutd
sibosutd / progress_bar.py
Created October 12, 2016 07:39
Implementation of python progress bar (or status bar) without using Progressbar library.
'''
Implementation of python progress bar (or status bar)
without using Progressbar library.
Result:
Completed: [==================================================] 100%
Created by Sibo, 12 Oct.
'''
import time

Recovering deleted files in Ubuntu with ext4 filesystem

Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.

Important

  • this procedure assumes that the partition that contained the deleted files is different from the root partition, as that was the scenario with which I had to deal (deleted files were in my home dir). The procedure needs that the partition that contained the files is unmounted, so if the deleted files were in the root partition, the process would be a bit different (e.g. storing the fs journal in a USB stick, using a live CD/USB to boot and issue the commands, etc.)
  • if something is not clear, you need more information, etc. check the sources below

With that out the way, let's begin.

@Brainiarc7
Brainiarc7 / fstab-generate-arch.md
Last active March 18, 2024 13:51
Generate fstab in Arch Linux

First, install arch-install-scripts:

sudo pacman -S --needed arch-install-scripts

Secondly, mount your partitions in all the internal hard drives.

Thirdly, generate and validate your config by piping it out to stdout: