Skip to content

Instantly share code, notes, and snippets.

View SiddheshNan's full-sized avatar

Siddhesh Nandurkar SiddheshNan

View GitHub Profile
@SiddheshNan
SiddheshNan / image-proxy.conf
Created June 9, 2019 03:49 — forked from tmaiaroto/image-proxy.conf
Nginx Image Filter Resize Proxy Service
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below).
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G;
# Gzip was on in another conf file of mine...You may need to uncomment the next line.
#gzip on;
gzip_disable msie6;
gzip_static on;
gzip_comp_level 4;
gzip_proxied any;
# Again, be careful that you aren't overwriting some other setting from another config's http {} section.

Create Root CA

Create Root Key

openssl genrsa -des3 -out rootCA.key 4096

Create and self sign the Root Certificate

@SiddheshNan
SiddheshNan / share_internet_using_eth_arch.sh
Created September 10, 2019 18:54
Share Internet using Ethernet on Arch Linux
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
echo Share Internet using Ethernet on Arch Linux - https://wiki.archlinux.org/index.php/Internet_sharing
echo ""
@SiddheshNan
SiddheshNan / unzip.php
Last active September 12, 2019 00:46
unzip an archive in php
<?php
// assuming file.zip is in the same directory as the executing script.
$file = 'file.zip';
// get the absolute path to $file
$path = pathinfo(realpath($file), PATHINFO_DIRNAME);
$zip = new ZipArchive;
$res = $zip->open($file);
if ($res === TRUE) {
@SiddheshNan
SiddheshNan / ctStart.sh
Last active December 12, 2019 20:27
CentFreshStartScript
echo 'Updating Packages...'
sudo yum update -y
echo 'Adding EPEL...'
sudo yum install epel-release -y
echo 'Setting timezone...'
sudo timedatectl set-timezone Asia/Kolkata
echo 'Setting up firewall...'
#!/bin/sh
set -e
if [[ $# -ne 3 ]] ; then
echo "Usage: $0 </dev/disk> <ssid> <passphase>"
exit 1
fi
DISK="$1"
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syy
pacman -Syu
rm /etc/resolv.conf
echo "nameserver 1.1.1.1" > /etc/resolv.conf
reboot
@SiddheshNan
SiddheshNan / setupSwap.sh
Created February 7, 2020 20:55
use for debian/ubuntu only
free -h
df -h
sudo fallocate -l 3G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
ls -lh /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
free -h
sudo apt-get install libatlas-base-dev libjasper-dev libqtgui4 python3-pyqt5 libqt4-test
description
This section explains how to perform the process of subscription and deployment of a private Thinger.io platform server.

SERVER DEPLOYMENT

Freemium accounts are perfect for learning and testing Thinger.io platform,