Skip to content

Instantly share code, notes, and snippets.

View aliabidzaidi's full-sized avatar
🌱

Ali Abid Zaidi aliabidzaidi

🌱
View GitHub Profile

How to Build : First install essentials for Trex

sudo apt -y install zlib1g-dev build-essential python python3-distutils

Note: you might need additional Linux packages for that:

  • yum based (Fedora, CentOS, RedHat):

    sudo yum install kernel-devel-`uname -r`

@aliabidzaidi
aliabidzaidi / fix.sh
Last active December 16, 2021 10:13
Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) [FIX]
# E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
# E: Unable to lock directory /var/lib/apt/lists/
# E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
# E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
sudo killall apt apt-get
# If none of the above works, remove the lock files. Run in terminal:
sudo rm /var/lib/apt/lists/lock

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@hamzahamidi
hamzahamidi / open-cmder-here.md
Last active June 14, 2024 15:37
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

Edit 04/2021:

As of the lastest versions, just execute the following command .\cmder.exe /REGISTER ALL per Documentation.

Original Solution

To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.

@fxmontigny
fxmontigny / get-set-html-quilljs-editor.js
Last active March 20, 2024 16:27
Insert and get html content with quilljs editor
const editor = $('.editor');
const quill = new Quill(editor);
// set html content
quill.setHTML = (html) => {
editor.root.innerHTML = html;
};
// get html content
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
@mnlcandelaria
mnlcandelaria / zeromq.sh
Last active May 4, 2024 06:26
How to install ZeroMQ on Ubuntu
# run in sudo
# Before installing, make sure you have installed all the needed packages
sudo apt-get install libtool pkg-config build-essential autoconf automake
sudo apt-get install libzmq-dev
# Install libsodium
git clone git://github.com/jedisct1/libsodium.git
cd libsodium
./autogen.sh
./configure && make check
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@albertodebortoli
albertodebortoli / change_author_git_commit.md
Last active November 10, 2023 08:41
Change the author of a commit in Git

Using Interactive Rebase

git rebase -i -p <some HEAD before all of your bad commits>

Then mark all of your bad commits as "edit" in the rebase file, and when git asks you to amend each commit, do

git commit --amend --author "New Author Name <email@address.com>"

edit or just close the editor that opens, and then do