Skip to content

Instantly share code, notes, and snippets.

View BRELID's full-sized avatar

Brahim RELID BRELID

View GitHub Profile
@BRELID
BRELID / write.js
Created July 24, 2019 11:53
Writing Files With NodeJS
var fs = require("fs");
var data = "New File Contents";
fs.writeFile("temp.txt", data, (err) => {
if (err) console.log(err);
console.log("Successfully Written to File.");
});
@BRELID
BRELID / append.js
Last active July 24, 2019 13:20
Append content in file with NodeJS
var fs = require("fs");
content = "New content"
fs.appendFile("log.txt", content+"\r\n", (err) => {
if (err) console.log(err);
console.log("Successfully append to File.");
});
@BRELID
BRELID / mongodump-helper.txt
Last active July 31, 2019 09:15
Command for dump database in mongodb / Commande pour extraire une base de donnée dans mongodb
// Command for dump database in mongodb
// Commande pour extraire une base de donnée dans mongodb
mongodump -d <YOUR_BASE> -o <WHERE_YOU_WANT_EXTRACT_YOUR_BASE>
ex:
mongodump -d customers -o ./backup
// Extract customers database in the backup folder
// Extrait la base de donnée customers dans le dossier backup
@BRELID
BRELID / bsondump-helper.txt
Created July 31, 2019 09:27
Command for transform .BSON to .JSON / Commande pour transformer un .BSON en .JSON
// Command for transform .BSON to .JSON
// Commande pour transformer un .BSON en .JSON
bsondump --outFile <OUTPUT_FILE> -bsonFile <YOUR_BSON_FILE> --pretty
ex:
bsondump --outFile ./customers-data/customers.json ./backup/customers.bson --pretty
FLAGS:
--outFile : path to output file to dump BSON to / chemin vers le fichier de sortie
--bsonFile : path to BSON file to dump to JSON / chemin vers le fichier BSON à transformer en JSON
@BRELID
BRELID / import-font-helper.css
Created August 2, 2019 10:14
How to import your fonts in css / Comment importer vos fonts en css
/**
* How to add fonts in your website
* Comment ajouter des fonts à votre site
*
* 1) Create a font-face with a name and the link of your font in your css file
* Créer une font-face avec un nom et le lien vers votre font dans votre fichier css
*
* 2) Select your font with the name of your font-face where you want where you want to use it
* Selectionner votre font, là où vous voulez l'utiliser, grace au nom de votre font-face
*
@BRELID
BRELID / test-mongo-alive.txt
Created August 19, 2019 08:03
Check if mongo db is running on Linux / Mac OS
// Command on linux / mac os:
// Commande sur linux et mac os :
ps -ef | grep mongod | grep -v grep | wc -l | tr -d ' '
// If result is 1, it's ok, mongo is running.
// Si vous avez 1 comme réponse, c'est que mongo est en train de tourner.
@BRELID
BRELID / chrome-without-cors.txt
Created August 19, 2019 10:30
Run Chrome browser without CORS
Linux:
google-chrome --disable-web-security
Windows:
1) Right click on desktop, add new shortcut
2) Add the target as "[PATH_TO_CHROME]\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp
ex on Windows 10 :
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp
@BRELID
BRELID / GoogleDorking.md
Created February 17, 2023 17:55 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"