Skip to content

Instantly share code, notes, and snippets.

View Lalatenduswain's full-sized avatar

Lalatendu Keshari Swain Lalatenduswain

View GitHub Profile
@anilshanbhag
anilshanbhag / hosts
Created November 21, 2013 05:47
Hosts file to prevent google / youtube ads Paste the contents into /etc/hosts file in linux / mac
127.0.0.1 3ad.doubleclick.net
127.0.0.1 ad-emea.doubleclick.net
127.0.0.1 ad-g.doubleclick.net
127.0.0.1 ad-yt-bfp.doubleclick.net
127.0.0.1 ad.3au.doubleclick.net
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
127.0.0.1 ad.br.doubleclick.net
127.0.0.1 ad.de.doubleclick.net
@erdii
erdii / install_vcenter_vcsa.md
Last active July 11, 2024 11:39
Install vCenter Server Appliance 6.5 without hash mismatch error!

Install VCSA 6.5 without hash mismatch error!

requirements

  • esxi host
  • dns or ip for both - esx and vcenter
  • correct time settings (ntp automates this, can be enabled on the esx-host)
  • use vcsa-cli installer (the iso contains vcsa-cli for win/lin/mac os)
  • "skipManifestCheck": "true" because of reasons (the installer repeatedly failed to verify integrity hashes of the created vm)
  • "os.password" and "sso.password" HAVE to pass vmware's pw rules PLUS their dictionary! (verification will pass with a pw in their dictionary but setup will not be able to complete! - we stumbled across this by pure chance after trying for 2 whole days!)
@m45k174
m45k174 / lamp.sh
Last active June 10, 2024 10:23 — forked from aamnah/lamp.sh
Bash script to install Apache, MySQL and PHP as well as PHPMyAdmin and some tweaks. For Debian and Ubuntu. To run, copy the script to the server and run ``bash lamp.sh``
#!/bin/sh
#######################################
# Bash script to install an AMP stack and PHPMyAdmin plus tweaks. For Debian based systems.
# Written by @AamnahAkram from http://aamnah.com
# In case of any errors (e.g. MySQL) just re-run the script. Nothing will be re-installed except for the packages with errors.
#######################################
#COLORS
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active July 20, 2024 15:07
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@Lalatenduswain
Lalatenduswain / .htaccess
Created April 12, 2022 06:02 — forked from vielhuber/.htaccess
Apache: htaccess force www and https ssl #server
# force HTTPS and www.
RewriteEngine On
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]
# alternative way
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
@TheHarold
TheHarold / gist:7b87c1170e97fb5cbefdfdc55faa925e
Last active May 3, 2023 11:12
Configure TPM2 to automatically unlock LUKS encrypted drive during boot on Ubuntu Server
This is a step by step document to help you setup unlocking LUKS partition with Clevis. However, Arch Linux Wiki details the built in support for unlocking LUCS without requiring Clevis but the steps are not entirely cleaar.
Step 1: Install Clevis packages and refresh the TPM permissions
```
$ sudo -i
# apt install clevis clevis-tpm2 clevis-luks clevis-udisks2 clevis-systemd clevis-initramfs -y
# udevadm trigger
```
@TheHarold
TheHarold / Password protect GRUB Menu editing only without forcing to enter credentials to load bootloader menu items.md
Created December 14, 2022 15:44
Password protect GRUB Menu editing only, without forcing to enter credentials to load bootloader menu items

Background
The requirement was to secure the bootloader without needing to share the credentials with the end user to be able to boot into the operating system.

Securing Bootloader is required to

i. Preventing Access to Single User Mode — If attackers can boot the system into single user mode, they are logged in automatically as root without being prompted for the root password.

ii. Preventing Access to the GRUB Console — If the machine uses GRUB as its boot loader, an attacker can use the use the GRUB editor interface to change its configuration or to gather information using the cat command.

iii Preventing Access to Non-Secure Operating Systems — If it is a dual-boot system, an attacker can select at boot time an operating system, such as DOS, which ignores access controls and file permissions.