Skip to content

Instantly share code, notes, and snippets.

@dbinoj
dbinoj / proxy.apache.conf
Created June 23, 2020 16:08 — forked from chrisjhoughton/proxy.apache.conf
Sample Nginx reverse proxy to Apache set up for Wordpress.
<VirtualHost *:{PORT}>
ServerName www.yourdomain.com
ServerAdmin mail@domain.com
DocumentRoot /var/www/yourdir/
<Directory /var/www/yourdir>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
@dbinoj
dbinoj / python38.md
Last active April 4, 2024 08:33 — forked from basaks/python36.md
Install Python 3.8.5 interpreter on ubuntu 18.04

Install Python3.8 interpreter on ubuntu 18.04

From here, we can pretty much follow the exact same procedure.

On a terminal just do the following steps:

Install dependencies:

sudo apt install build-essential checkinstall libreadline-gplv2-dev \

@dbinoj
dbinoj / NORMSDIST.js
Last active April 9, 2022 18:58
Javascript implementation of NORMSDIST function from Excel
function NORMSDIST(z) {
// Uses https://cdn.jsdelivr.net/jstat/latest/jstat.min.js
if (isNaN(z)) return '#VALUE!';
var mean = 0, sd = 1;
return jStat.normal.cdf(z, mean, sd);
}
@dbinoj
dbinoj / syslog-ng.sh
Created February 26, 2016 17:56
Function to check if network drive is mounted before starting syslog-ng Raw
# --- /etc/init.d/syslog-ng
# --- For use at manual start of syslog-ng only.
# --- Do not use this mod if syslog-ng is "on" at any runlevel. (check with 'chkconfig --list syslog-ng')
check_storage()
{
while :
do
if mount | grep "/dev/sdb1 on /var/logs type ext4" | grep "rw" > /dev/null; then
echo "/dev/sdb1 is ready..."