Skip to content

Instantly share code, notes, and snippets.

View mskian's full-sized avatar
🦕
Focusing

Santhosh Veer mskian

🦕
Focusing
View GitHub Profile
@mskian
mskian / deploy.sh
Created December 15, 2021 14:21
Keep Update your Next.js project from your Local System to Server via rsync
#!/bin/bash
rsync -azP /home/mylocalsystem/iamhuman/react/next-example-project --delete-after --exclude 'node_modules' --exclude 'out' --exclude '.next' root@<Server-IP>:/var/www/
@mskian
mskian / workers.js
Created October 21, 2020 05:05
use Cloudflare Worker as Middle Man in JSON API
//https://example.test.workers.dev/?mydata=hello
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
async function fetchAndApply(request) {
const init = {
method: 'GET'
}
const { searchParams } = new URL(request.url);
@mskian
mskian / api-example.conf
Last active October 10, 2020 04:59
Nginx Fastcgi Cache Conf for PHP API
fastcgi_cache_path /etc/nginx/cache/apiapp levels=1:2 keys_zone=apiapp:100m inactive=60m max_size=40m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name api.example.com;

Keybase proof

I hereby claim:

  • I am mskian on github.
  • I am santhoshveer (https://keybase.io/santhoshveer) on keybase.
  • I have a public key ASDaDttReyKq2E0pujwB58govOvHm83Prz_2dvqzCOZTwwo

To claim this, I am signing this object:

@mskian
mskian / pihole.conf
Last active September 10, 2020 12:51
Pihole Nginx Configuration
server {
listen 80;
listen [::]:80;
server_name pihole.example.com;
root /var/www/html;
index pihole/index.php index.php index.html index.htm;
charset UTF-8;
@mskian
mskian / sslnginx.sh
Created June 16, 2020 09:38
Restart and Reload Nginx Every 24 Hours
#!/bin/bash
# == Cron Job ==
# Run Every 24 Hours
# 0 */24 * * * /etc/sslnginx.sh > /dev/null 2>&1
service nginx reload
sleep 1;
@mskian
mskian / .htaccess
Created March 26, 2020 11:49 — forked from conormcafee/.htaccess
Jekyll .htaccess for Apache Server
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)/$ $1.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*[^/]$ %{REQUEST_URI}/ [L,R=301]
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
@mskian
mskian / gotify.sh
Created January 22, 2020 11:45
Gotify - A Simple Shell Script to Send Push Notification to the Gotify Server
#!/bin/bash
# -----------------------------------------------------------------------------
# Info:
# author: Santhosh veer
# website: https://santhoshveer.com
# file: gotify.sh
# created: 22.01.2020
# revision: 22.02.2020
# version: 0.1
@mskian
mskian / config.production.json
Created November 7, 2019 05:30
Disable Default schema markup on Ghost CMS - Example configuration
{
"url": "http://localhost:2368/",
"server": {
"port": 2368,
"host": "127.0.0.1"
},
"database": {
"client": "sqlite3",
"connection": {
"filename": "/home/groot/var/www/santhoshveer/content/data/ghost-local.db"
@mskian
mskian / ratings.json
Last active October 24, 2019 14:05
Add Star Ratings for Product Review
{
"@context": "http://schema.org",
"@type": "Review",
"itemReviewed": {
"@type": "Product",
"name": "Hello Product review"
},
"reviewRating": {
"@type": "Rating",
"ratingValue": "5.0",