Skip to content

Instantly share code, notes, and snippets.

View woodsleaf's full-sized avatar

Pavel Kononov woodsleaf

View GitHub Profile
@woodsleaf
woodsleaf / History|4a83ff42|ABXF.json
Last active April 11, 2022 18:43
Visual Studio Code Settings Sync Gist
{
"sync.gist": "f6a2012f793aacc8c956212224216e56"
}
@woodsleaf
woodsleaf / node_nginx_ssl.md
Created January 26, 2022 19:39 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@woodsleaf
woodsleaf / gist:b3c9a8236f59ed6562516aa2affe7209
Created January 26, 2022 08:21 — forked from Atem18/gist:4696071
Tutorial to seting up a django website in production.

******************************************************************** Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor********************************************************************

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
@woodsleaf
woodsleaf / Readme.md
Created August 1, 2019 18:38 — forked from Dmitriy-8-Kireev/Readme.md
Docker Шпаргалка
@woodsleaf
woodsleaf / update wp
Created June 30, 2019 13:44 — forked from tw3eX/update wp
update wp
UPDATE wp_options SET option_value = replace(option_value, 'http://wp', 'http://pushkarev-adv.ru') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://wp','http://pushkarev-adv.ru');
UPDATE wp_posts SET post_content = replace(post_content, 'http://wp', 'http://pushkarev-adv.ru');
@woodsleaf
woodsleaf / .htaccess
Created March 8, 2019 03:45 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://andreas-hecht.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@woodsleaf
woodsleaf / SSL-certs-OSX.md
Created February 23, 2019 19:39 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@woodsleaf
woodsleaf / post-recieve
Created February 21, 2019 13:39 — forked from bgallagh3r/post-recieve
Make git run composer install/update after you push to remote server.
#!/bin/bash
DIR=$(git rev-parse --show-toplevel)
if [ -e "$DIR/composer.json" ]; then
if [ -d "$DIR/vendor" ]; then
composer.phar install
else
composer.phar update
fi
@woodsleaf
woodsleaf / turnon.py
Last active April 10, 2018 05:40
Включение бита флага
def turnon(a):
mask = 0b100
desired = a | mask
# print(bin(desired))
# if a != desired:
return desired
a = 0b10111011
print(bin(turnon(a)))