Skip to content

Instantly share code, notes, and snippets.

View security.conf
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# currently suppoorted in IE > 8
View basic-html-skeleton.html
<!DOCTYPE html>
<html lang="es" itemscope itemtype="">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="[SITE DESCRIPTION]">
<meta name="keywords" content="">
<meta name="robots" content="index, follow, archive">
ansulev / mysql.txt
Created Oct 11, 2021 — forked from sarvar/mysql.txt
Changing WordPress URLs in MySQL Database
View mysql.txt
UPDATE wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, '','');
UPDATE wp_posts SET post_content = replace(post_content, '', '');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'','');
ansulev / install-arch-linux-btrfs-dual-boot-t480s.txt
Last active Feb 3, 2022
Install Arch Linux with Btrfs - dual boot with Win10 on ThinkPad t480s
View install-arch-linux-btrfs-dual-boot-t480s.txt
# Install Arch Linux dual boot with Windows 10 on Thinkpad T480s.
# Btrfs subvolumes inside. UEFI and Secure Boot enabled.
# filename: install-arch-linux-btrfs-dual-boot-t480s.txt
# The official guide:
# Shrink Windows partition to make room for the linux.
# Remove BitLocker encryption and Fast Boot. After install can re-enable BitLocker.
# Need to setup again Bitlocker, PIN, Fingerprint (tested on Win10 1909)
# Download the archiso image from
View Install PHP 7.4 - Debian 10
# Add suri repo
sudo apt -y install lsb-release apt-transport-https ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg
echo "deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo update
# install php7.4
sudo apt-get install php7.4
# for nginx
apt install php7.4-fpm php7.4-{apcu,bcmath,bz2,cgi,cli,common,curl,dba,enchant,intl,gd,imap,json,,mbstring,mysql,odbc,opcache,phpdbg,redis,snmp,soap,sqlite3,tidy,xml,xsl,zip}
ansulev / Browser Extensions
Last active Feb 3, 2022
Must-Have Browser Extensions
View Browser Extensions
# Must-Have Browser Extensions
# Privacy, Development, Hacking
# Last edit: 24/02/2021
* Mozilla Firefox
AdNaseum (or Ublock Origin)
Auto Tab Discard
ansulev /
Last active Apr 15, 2022 — forked from pigeonflight/
Install Python 2.7.17 on Ubuntu 14.04
# usage
# bash
sudo apt-get update
sudo apt-get install build-essential checkinstall -y
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y
cd /usr/src
sudo wget
sudo tar xzf Python-2.7.17.tgz
cd Python-2.7.17
sudo ./configure --enable-optimizations
ansulev / web-development-resources.txt
Last active Feb 3, 2022
Web Development Resources
View web-development-resources.txt
1. Web developer roadmap -
2. Git -
3. CSS frameworks
Pure CSS
ansulev /
Last active Apr 26, 2022 — forked from romuloctba/
Install Adobe Photoshop CS6 on Wine (Arch Linux)

Step 1. Install the Wine and Winetricks

  sudo pacman -S wine winetricks

Step 2. Using winetricks to get install dependencies for Photoshop CS6

winetricks atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008 ie6 fontsmooth-rgb gecko
ansulev / nginx.conf
Created Feb 15, 2019 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048