Skip to content

Instantly share code, notes, and snippets.

@dmdotin
dmdotin / gist:37c9bad7f31f510eac9e2955a7b095fc
Created January 31, 2022 14:16 — forked from dvlop/gist:fca36213ad6237891609e1e038a3bbc1
My long list of bad bots to block in htaccess, ready to copy and paste!
# Start Bad Bot Prevention
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^12soso.*" bad_bot
SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot
SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot
SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot
SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot
SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot
SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot
@dmdotin
dmdotin / Fixing Ubuntu - Filesystem Unknown , Entering Rescue mode , grub rescue
Last active July 14, 2021 20:42
Fixing Ubuntu - Filesystem Unknown , Entering Rescue mode , grub rescue
grub rescue> ls [Enter]
Then try first option / if not works and make error use next one ..
grub rescue> ls (hd0,msdos7) [Enter]
(hd0,msdos7) : Filesystem is unknown .
grub rescue> ls (hd0,msdos6) [Enter]
(hd0,msdos6): Filesystem is ext2.
@dmdotin
dmdotin / restrict empty atom file in ubuntu 20 snap editon
Created November 1, 2020 09:45
restrict empty atom file in ubuntu 20 snap editon
HELP : https://discuss.atom.io/t/whenever-i-start-atom-it-opens-a-file-weird-file/75721/8
First Create a Backup
sudo cp /var/lib/snapd/desktop/applications/atom_atom.desktop /var/lib/snapd/desktop/applications/atom_atom.desktop.bak
To fix it you just need to run this command:
sudo sed -i 's/Exec=env BAMF_DESKTOP_FILE_HINT=\/var\/lib\/snapd\/desktop\/applications\/atom_atom.desktop \/snap\/bin\/atom ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false \/usr\/bin\/atom %F/Exec=env BAMF_DESKTOP_FILE_HINT=\/var\/lib\/snapd\/desktop\/applications\/atom_atom.desktop ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false \/snap\/bin\/atom %F/' /var/lib/snapd/desktop/applications/atom_atom.desktop
@dmdotin
dmdotin / curl_get_image
Created August 22, 2020 15:10 — forked from Tom-Millard/curl_get_image
Curl get image and data
<?php
class curl_get_image{
private $image_name = "";
private $data = "";
private $dir = "";
private $details = array();
@dmdotin
dmdotin / install .tar or .tar.gz files to ubuntu
Created March 30, 2020 17:14
install .tar or .tar.gz files to ubuntu
cd Downloads
$ tar xvf file.tar
OR
$ tar xvfz file.tar.gz
$ ./configure
$ make
$ make install
@dmdotin
dmdotin / Install Rambox in Ubuntu
Last active December 18, 2018 12:26
Install Rambox in Ubuntu
Updated Dec 18 , 2018 / Version 0.6.3
32 bit
sudo apt install gdebi
Visit https://github.com/saenzramiro/rambox/releases & get Latest Release
wget https://github.com/ramboxapp/community-edition/releases/download/0.6.3/Rambox-0.6.3-linux-i386.deb
@dmdotin
dmdotin / How to Format a USB Flash Drive - NTFS , FAT32 , RAW ( Windows )
Last active December 16, 2018 12:44
How to Format a USB Flash Drive - NTFS , FAT32 . RAW ( Windows )
1. Open up cmd from the start menu
2. Type compmgmt.msc to open your computer management tool and locate the disk (Number) [ From Storage > Disk Managemnt ]
3. Once you have the disk number, remember it, then pull command prompt back up and type in: diskpart
4. Type: list disk
5. Then type: select disk 2 (if Number is 2 .. From step 2 )
6. Then type: clean
7. Then Type: create partition primary
8. Then type: active
9. Finally type: format fs= fat32 (OR NTFS)
[ Note it will take little time , Dont remove USB till formatting finished , you can check details in Step 2 Window ]
@dmdotin
dmdotin / Enabling Ubuntu - win 10 Dual boot Select menu in HP Laptop
Created June 16, 2018 11:03
Enabling Ubuntu - win 10 Dual boot Select menu in HP Laptop
Install Ubuntu for Dual OS ( as normal )
Start Laptop & check if Dual boot select menu appears ..
If no .. Shut down & Start Again ..
Press " ESC " key to enter boot menu
Enter Bios Setup F10
@dmdotin
dmdotin / How to move desktop launcher to bottom in ubuntu 16
Created May 16, 2018 17:22
How to move desktop launcher to bottom in ubuntu 16
Open Terminal - Ctrl+Alt+T
Enter below command -
gsettings set com.canonical.Unity.Launcher launcher-position Bottom
if you want to move back to left use command below -
gsettings set com.canonical.Unity.Launcher launcher-position Left
@dmdotin
dmdotin / Install Brave browser to Ubuntu
Created May 16, 2018 17:14
Install Brave browser to Ubuntu
Open Terminal Press - Ctrl+Alt+T
Enter
wget -O brave.deb https://laptop-updates.brave.com/latest/dev/ubuntu64
Once finished Enter
sudo dpkg -i brave.deb