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 / 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 / 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
@dmdotin
dmdotin / Mounting Drive problem ubuntu windows dual boot
Created April 4, 2018 19:11
Mounting Drive problem ubuntu windows dual boot
Open your applications menu, search for “Disks”, and launch the Disks application.
Seelct the drive containing the Windows system partition, and then select the Windows system partition on that drive. It’ll be an NTFS partition.
Click the gear icon below the partition and select “Edit Mount Options”.
Disable the “Automatic Mount Options” setting at the top of the window.
In the mount options box, copy-paste or type the following text ..
,remove_hiberfile
@dmdotin
dmdotin / Verify downloaded file checksum in ubuntu
Created April 3, 2018 20:00
Verify downloaded file checksum in ubuntu
Open Terminal using ..
Ctrl+Alt+T
Assume you downloaded ISO file in " Downloads/ISO files " Directory
Use " cd " command to enter the folders .. Example :
$ cd Downloads/ISO\ files/ & Press Enter ( If your folder names are with space use back slash , space to enter the directory )