Skip to content

Instantly share code, notes, and snippets.

View harish-chander's full-sized avatar

Harish Chander harish-chander

  • Infobug
  • Dubai,UAE
View GitHub Profile
@harish-chander
harish-chander / sysctl.conf
Created December 10, 2024 06:38 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@harish-chander
harish-chander / snat_dnat_advantech.md
Created March 15, 2021 08:53 — forked from tomasinouk/snat_dnat_advantech.md
examples of SNAT, DNAT with iptables for Advantech, Conel routers, with comments (probably will work on other routers where iptables can be manipulated, care needs to be taken on applying these commands after reboot)

Some examples of SNAT, DNAT with iptables with comments

mainly used in start-up script

masquarade all outgoing packets to be WLAN0 IP

iptables -t nat -A PREROUTING -s 192.168.1.2 -i eth0 -j MASQUERADE

All packets leaving eth0 will have src eth0 ip address

@harish-chander
harish-chander / cloudSettings
Last active March 18, 2019 09:53
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-03-18T09:53:20.406Z","extensionVersion":"v3.2.7"}
Verifying that "elitcartman.id" is my Blockstack ID. https://onename.com/elitcartman
<html>
<head>
<meta charset="UTF-8">
<title>Funk buzz</title>
<?php include('head_inc.php');
include('headstyle.php'); ?>
</head>
<body>
<?php
session_start();
<!DOCTYPE html>
<html>
<head>
<?php include("headmain.inc"); ?>
<title>UniSync</title>
</head>
<body>
<?php
include("menu.php");
?>
<html>
<head>
<?php include("headmain.inc"); ?>
<title>UniSync</title>
</head>
<body>
<?php
include("menu.php");
?>
<?php
if(isset($_FILES['dp']))
{
if($_FILES['dp']['error'] > 0)
{
echo('<script>$.notify("Cannot upload the Picture","error");</script>');
}
else
{
$filename=$_FILES['dp']['name'];
<?php
//Check if any user is already logged in
session_start();
if(!empty($_SESSION['username']))
{
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'landing page';
header("Location: http://$host$uri/$extra");
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl+z1RKH4ApcuNnb0GBSNKBqu2Myg/JypZn6m3SIzcQl7AXWAQAh7Fy2VmyXqPoPwpUJvPD9oAISoMcE5yLkm2HMy8AdKO48rSp74c5dozXMiSDmW6ZQBClOPrUqDd1Pf/dIg8QAb3nb2hCGuM3dJhDdLI2Gf74hji25o+26d20/+SFcUoHHHwuk9pxbWhHxYqgcgH1oe+lbHvcq9UZSJCc6l8bFdN5F7uQ7qEc9ucsjvpg7MDtYT2JHr1bhjoNbEUslbA7jtSp5VkMHfF+mlG+x4mps/ti7U41WQ2F4kFPBUm2DI/DxnRoN82WQ4giYE2UkfqK7TOyi6vuI0nnxHv star@Harishs-MacBook-Pro.local
rancher:
network:
interfaces:
eth*:
dhcp: true
dns: