Skip to content

Instantly share code, notes, and snippets.

View imagewall.json
{
"info": {
"index": 0,
"photos": [
{
"engineInfo": {
"rawUrl": "https://i.picsum.photos/id/1012/3973/2639.jpg?hmac=s2eybz51lnKy2ZHkE2wsgc6S81fVD1W2NKYOSh8bzDc"
},
"thumbnail": "Bette Flores"
},
@z2z
z2z / nginx.service
Created Oct 27, 2020 — forked from bes1002t/nginx.service
Start Nginx as non root user with systemd
View nginx.service
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
@z2z
z2z / add business date exclude.php
Created Jul 2, 2020
business date add exclude holiday php
View add business date exclude.php
<?php
# $date must be in YYYY-MM-DD format
# You can pass in either an array of holidays in YYYY-MM-DD format
function addBusinessDays($date,$numDays=1,$holidays='') {
$addDay = 0;
while ($numDays--) {
@z2z
z2z / centos7-hyper-v.ks
Created May 2, 2020
centos 7 bare minimal - hyper-v
View centos7-hyper-v.ks
#https://bugs.centos.org/view.php?id=7388
#https://forums.centos.org/viewtopic.php?t=47262
#### Here is my kickstart script ####
text
skipx
install
lang en_US.UTF-8
keyboard us
@z2z
z2z / nfs3_firewall_allow.bat
Created Apr 11, 2020
need for speed 3 firewall batch
View nfs3_firewall_allow.bat
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
@z2z
z2z / need for speed 4 high stake.reg
Created Apr 9, 2020
need for speed 4 high stake.reg window 10 64bit ((Change the Path))
View need for speed 4 high stake.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\NfsHs.exe]
"path"="D:\\G\\nfs4hs_ip\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Electronic Arts\Need For Speed High Stakes]
"InstallPath"="D:\\G\\nfs4hs_ip\\"
"Version"="4.00"
"3D Device Description"="Unknown D3D"
"3D Card"="Unknown D3D"
View nginx-security
Source: https://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html
This page collects hints how to improve the security of nginx web servers running on Linux or UNIX-like operating systems.
Default Config Files and Nginx Port
/usr/local/nginx/conf/ or /etc/nginx/– The nginx server configuration directory and /usr/local/nginx/conf/nginx.conf is main configuration file.
/usr/local/nginx/html/ or /var/www/html– The default document location.
/usr/local/nginx/logs/ or /var/log/nginx – The default log file location.
Nginx HTTP default port : TCP 80
View php_with_pthreads_installation_on_linux.txt
# Instructions. Copy and paste the codes below:
cd /usr/local/src
# Download all needed archives, four(4) archives
# For PHP source
wget http://au1.php.net/get/php-5.6.21.tar.bz2/from/this/mirror -O php.tar.gz
# For curl. You can choose from any mirror site from https://curl.haxx.se/latest.cgi?curl=tar.gz&all=yes
wget https://dl.uxnr.de/mirror/curl/curl-7.48.0.tar.gz
# For libxml2
View phpinstall.bash
#!/bin/sh
# Some Notes About Free TDS
# #
# # TDS
# #
# SYBASE=$HOME/usr/lib
# LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
#
@z2z
z2z / compile-redis-portable.sh
Created Jan 30, 2020 — forked from mitjafelicijan/compile-redis-portable.sh
Creates portable version of Redis (Linux)
View compile-redis-portable.sh
#!/bin/sh
# http://download.redis.io/releases/
# Usage: sh compile-redis-portable.sh
VERSION="4.0.6"
INIT_PATH=`dirname "$0"`
INIT_PATH=`( cd "$INIT_PATH" && pwd )`