Skip to content

Instantly share code, notes, and snippets.

@z2z
z2z / Letsencrypt CertBot on Ubuntu 14.04 with NginX.sh
Last active July 19, 2016 11:32
Letsencrypt CertBot on Ubuntu 14.04 with NginX.sh
# https://certbot.eff.org/#ubuntutrusty-nginx
# http://www.jeffmould.com/2016/05/14/install-lets-encrypt-ssl-certificate-laravel/
# https://loune.net/2016/01/https-with-lets-encrypt-ssl-and-nginx/
# https://community.letsencrypt.org/t/how-to-nginx-configuration-to-enable-acme-challenge-support-on-all-http-virtual-hosts/5622
sudo mkdir /usr/share/nginx/letsencrypt/.well-known
sudo cd /usr/share/nginx/letsencrypt
sudo chown -R user:www-data letsencrypt
@z2z
z2z / SetupDevMachine.bat
Created January 6, 2017 11:51 — forked from winiciuscota/SetupDevMachine.bat
Script to setup a new windows machine with the programs I use
REM -----------------------------------------------
REM Install basic programs
REM -----------------------------------------------
echo Installing chocolatey
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
echo Installing utility programs
@z2z
z2z / winginx_patch.php
Last active July 11, 2019 08:58
WINGINX patch to support php 5.6 and 7.0
<?php
/*
src - https://stackoverflow.com/a/36291595
usage - php winginx_patch.php
After applying this patch you can use "php56", "php70" and "php71"
folders in the root directory of winginx.
*/
function patch($file, $offset, $old_data, $new_data) {
if (!$f = fopen($file, 'r+b')) {
die("Can not open $file");
@z2z
z2z / php nginx setup links.txt
Created March 26, 2017 09:06
php nginx setup links
@z2z
z2z / phpstorm_start.bat
Created July 6, 2017 14:47
phpstorm start bat
start "C:\dvt-jb-lic-server\" dvt-jb_licsrv.amd64.exe
c:
cd "C:\Program Files (x86)\JetBrains\PhpStorm 2016.3.2\bin\"
start "C:\Program Files (x86)\JetBrains\PhpStorm 2016.3.2\bin\" phpstorm64.exe
timeout /t 180
Taskkill /im dvt-jb_licsrv.amd64.exe /f
@z2z
z2z / install-pdf2htmlEX-ubuntu-14.04.sh
Created September 8, 2017 06:17 — forked from giordanocardillo/install-pdf2htmlEX-ubuntu-14.04.sh
Installing pdf2htmlEX on Ubuntu Server 14.04
#!/bin/sh
RESTORE=$(echo '\033[0m')
BOLD=$(echo '\033[1m')
GREEN=$(echo '\033[1;32m')
echo
echo ${GREEN}
echo "------------------------------"
echo " Installing prerequisites "
echo "------------------------------"
echo
@z2z
z2z / pd2htmlEX.Ubuntu16.sh
Created September 8, 2017 07:00 — forked from agyemanjp/pd2htmlEX.Ubuntu16.sh
pdf2htmlEX install shell script for Ubuntu 16.04, using latest sources
#!/bin/bash
# pdf2htmlEX install shell script for Ubuntu 16.04, using latest sources
# Created by James A. Prempeh ( github.com/prmph )
HOME_PATH=$(cd ~/ && pwd)
LINUX_ARCH="$(lscpu | grep 'Architecture' | awk -F\: '{ print $2 }' | tr -d ' ')"
POPPLER_SOURCE="https://poppler.freedesktop.org/poppler-0.43.0.tar.xz"
FONTFORGE_SOURCE="https://github.com/fontforge/fontforge.git"
PDF2HTMLEX_SOURCE="https://github.com/coolwanglu/pdf2htmlEX.git"
@z2z
z2z / .deployment
Created October 13, 2017 13:41
Azure App service deployment for Laravel 5
[config]
command = bash deploy.sh
@z2z
z2z / github-to-bitbucket
Created December 14, 2017 11:25 — forked from hongshunyang/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone [email protected]:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync [email protected]:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
@z2z
z2z / CentOS 7.3 - User config
Created December 22, 2017 11:23 — forked from phackwer/CentOS 7.3 - User config
CentOS 7.3 - User config
PRIMEIRA COISA
https://copr.fedorainfracloud.org/coprs/duh/GNOME_3.22_for_RHEL_and_CentOS_7.x/
#############################################################################################################################
#
# INSTALAÇÃO DO CENTOS 7.2 - CUSTOMIZAÇÃO BÁSICA
#
#############################################################################################################################
# Passos básicos - Configuração do Gnome (como root)R