Skip to content

Instantly share code, notes, and snippets.

@ansulev
ansulev / install-photoshop-cs6.md
Last active April 8, 2024 04:28 — forked from romuloctba/readme.md
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
ansulev / nginx.conf
Created February 15, 2019 06:32 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ansulev
ansulev / arch-install-dual-encrypted-t480s.sh
Last active March 20, 2023 16:18
Install UEFI Arch Linux dual boot with Windows 10 on Thinkpad T480s. Full encrypted btrfs subvolume inside luks. UEFI and Secure Boot enabled.
# Install Arch Linux dual boot with Windows 10 on Thinkpad T480s. Dec 2018.
# Full encrypted btrfs subvolume inside luks. UEFI and Secure Boot enabled.
# filename: install-arch-linux-on-btrfs-subvolume-inside-luks.txt
# The official guide: https://wiki.archlinux.org/index.php/Installation_Guide
# Last edit: 2021/10/11 (Work in priogress...)
# 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 1803)
define('DELETE_EXPIRED_TRANSIENTS', true);
define('DELETE_EXPIRED_TRANSIENTS_HOURS', '6');
define('DELETE_EXPIRED_TRANSIENTS_MAX_EXECUTION_TIME', '10');
define('DELETE_EXPIRED_TRANSIENTS_MAX_BATCH_RECORDS', '50');
define('DISABLE_ADMIN_AJAX', false);
define('DISABLE_CART_FRAGMENTS', true);
define('DISABLE_EMBEDS', true);
define('DISABLE_EMBEDS_ALLOWED_SOURCES', 'none');
define('DISABLE_EMOJIS', true);
define('DISABLE_GUTENBERG', true);
<!-- For old IEs -->
<link rel="shortcut icon" href="favicon.ico" />
<!-- For new browsers - multisize ico -->
<link rel="icon" type="image/x-icon" sizes="16x16 32x32" href="favicon.ico">
<!-- For iPad with high-resolution Retina display running iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="favicon-152.png">
@ansulev
ansulev / prestashop.conf
Created September 30, 2018 17:01 — forked from julienbourdeau/prestashop.conf
PrestaShop Nginx Configuration
server {
listen 80;
listen [::]:80; #Use this to enable IPv6
server_name www.example.com;
root /var/www/prestashop17;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.php index.html;
@ansulev
ansulev / nginx-ps-config
Created September 30, 2018 09:01 — forked from ASergey/nginx-ps-config
Example prestashop 1.6 nginx host config
server {
listen 80;
server_name maxmobiles.lo *.maxmobiles.lo;
root /var/www/maxmobiles.lo;
error_log /var/www/maxmobiles.lo/log/error.log warn;
location / {
index index.html index.php; ## Allow a static html file to be shown first
@ansulev
ansulev / convert-crt-to-jks.sh
Created August 15, 2018 10:22
Convert .CRT y .KEY Certificates to JKS Keystore
# Convert it into pkcs12 format
openssl pkcs12 -export -out jenkins.p12 -inkey certificate.key -in certificate.crt -name "jenkins-cert"
# Create keystore if not exist
https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html
# Import
keytool -importkeystore -srckeystore jenkins.p12 -srcstoretype pkcs12 -destkeystore keystore.jks
@ansulev
ansulev / laravel-nginx-site.conf
Created August 9, 2018 09:03
Laravel Website Configuration NGINX
server {
# Port that the web server will listen on.
listen 80;
# Host that will serve this project.
server_name app.dev;
# Useful logs for debug.
access_log /path/to/access.log;
@ansulev
ansulev / kubernetes-demo.sh
Created July 24, 2018 14:15
Kubernetes demo app from GCloud
#
# Kubernetes demo cloud shell scripts ...
#
TUTORIALDIR=src/gke_guestbook-2018-07-24-16-37
git clone https://github.com/GoogleCloudPlatform/kubernetes-engine-samples.git $TUTORIALDIR
cd $TUTORIALDIR
cat redis-master-controller.yaml
cat redis-master-service.yaml
gcloud container clusters get-credentials demo-cluster-1 --zone us-central1-a