Skip to content

Instantly share code, notes, and snippets.

View firstval's full-sized avatar
👋

First Val Babon firstval

👋
  • Philippines
View GitHub Profile
@firstval
firstval / centos7.sh
Created April 5, 2016 15:13 — forked from yyang/centos7.sh
centos 7 pptpd firewalld
#!/bin/sh
#
# pptpd installation script on my own CentOS 7 box.
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules
#
# Author: 2015 Steve Yang <me@iyyang.com>
# The script comes with ABSOLUTELY NO WARRANTY.
https://raymii.org/s/tutorials/IPSEC_L2TP_vpn_on_CentOS_-_Red_Hat_Enterprise_Linux_or_Scientific_-_Linux_6.html
http://talkerscode.com/webtricks/upload-image-without-page-refresh-using-ajax-jquery-and-php.php
@firstval
firstval / group_vars
Created April 12, 2016 02:34 — forked from charypar/group_vars
Deploying SSL keys securely with Ansible (code)
---
ssl_certificates:
- certificate_src: secure.example.com.pem
certificate_dest: /etc/ssl/certs/secure.example.com.pem
key_src: secure.example.com.protected.key
key_dest: /etc/ssl/private/secure.example.com.protected.key
key_stripped: /etc/ssl/private/secure_example.com.key
key_password: "{{ssl_passphrase}}"
@firstval
firstval / mysql_secure.sh
Created April 12, 2016 07:11 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@firstval
firstval / 0_reuse_code.js
Created April 13, 2016 09:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@firstval
firstval / letsencrypt.md
Created April 15, 2016 08:09 — forked from xrstf/letsencrypt.md
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

https://www.rosehosting.com/blog/how-to-install-drupal-7-on-centos-7-with-nginx-mariadb-and-php-fpm/
https://www.howtoforge.com/tutorial/how-to-install-drupal-8-with-nginx-and-ssl-on-ubuntu-15-10/
http://www.linuxtechi.com/how-to-install-drupal-8-on-centos-7/
https://webtatic.com/packages/php70/
https://www.rosehosting.com/blog/how-to-install-lemp-linux-nginx-mariadb-php-fpm-on-a-centos-7-vps/
http://marcmojica.com/how-to-install-nginx-on-centos-7-with-php-7-php-5-and-mysql-mariadb-in-azure-or-hyper-v/
https://www.digitalocean.com/community/tutorials/how-to-use-find-and-locate-to-search-for-files-on-a-linux-vps
https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-centos-7
https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-14-04
https://easy-wi.com/
https://blogs.msdn.microsoft.com/benjaminperkins/2014/05/05/make-your-own-ssl-certificate-for-testing-and-learning/
http://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer-using-the-command-line
http://manpages.ubuntu.com/manpages/wily/man8/useradd.8.html
http://www.cyberciti.biz/faq/linux-remove-user-command/