Skip to content

Instantly share code, notes, and snippets.

View eddydarell's full-sized avatar
👋
Working

Eddy Ntambwe eddydarell

👋
Working
View GitHub Profile
@eddydarell
eddydarell / Get allfiles containing a phrase.md
Created July 27, 2021 14:15
Get all the files containing a phrase on Unix based system

Get all files containing a phrase on a Unix based system like Linux or MacOs

grep -rnw [path/to/somehting] -e "[phrase]"
@eddydarell
eddydarell / Remove all styling on a page.md
Created July 27, 2021 14:11
Remove all styling on a page

Remove all styling on a page using vanilla JavaScript.

document.querySelectorAll('style,link[rel="stylesheet"]').forEach(item => item.remove())

Do a regular data dump with mysqldump or using a tool like MySQL Workbench and then run the command bellow to remove the primary key:

sed -i '' "s/([0-9]*,/(NULL,/gi" dump.sql    

Useful when trying to appends data from an SQL export file of a table with the same structure.