Skip to content

Instantly share code, notes, and snippets.

View TheAshwanik's full-sized avatar
💭
Hi.. Don't hesitate to ping me.. I would love an interesting chat about tech.

Ashwani Kumar TheAshwanik

💭
Hi.. Don't hesitate to ping me.. I would love an interesting chat about tech.
View GitHub Profile
@TheAshwanik
TheAshwanik / index.html
Last active September 9, 2015 10:06 — forked from d3noob/.block
d3.js tree from csv
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Collapsible Tree Example</title>
<style>
.node circle {
@TheAshwanik
TheAshwanik / Intresting Readings
Last active July 9, 2020 23:44
Things which I stumble upon accidentally and would want to learn more about them.
1. An Analysis of China’s “Great Cannon"
https://www.usenix.org/system/files/conference/foci15/foci15-paper-marczak.pdf
2. Amazon Webservices in Plain English
https://www.expeditedssl.com/aws-in-plain-english
3. AWS - microservices-without-the-servers
https://aws.amazon.com/blogs/compute/microservices-without-the-servers/
@TheAshwanik
TheAshwanik / MQTT_Mosquittto_ACL.md
Created March 14, 2015 00:37
How to make Access Control Lists (ACL) work for Mosquitto MQTT Broker with Auth Plugin?

Source:http://my-classes.com/2015/02/05/acl-mosquitto-mqtt-broker-auth-plugin/

How to make Access Control Lists (ACL) work for Mosquitto MQTT Broker with Auth Plugin?

If you planning to strengthening your MQTT service, then access control lists (ACL) are mandatory. Mosquitto broker supports this ACL feature through auth plugins.

One versatile auth-plugin for mosquitto that you should consider using is https://github.com/jpmens/mosquitto-auth-plug. It is very flexible, in that it can support multiple backends as auth provider databases, ranging from CDB, Redis to MySQL and Http. However, getting it compiled and making it start to work is not that straight forward or easy. Hence, this post. It gives some starting point to our students who are venturing into Mosquitto Authentication systems to get started.

Building the Mosquitto-Auth-Plugin

#!/bin/bash
sudo apt-get --yes purge xserver* x11-common x11-utils x11-xkb-utils x11-xserver-utils xarchiver xauth xkb-data console-setup xinit lightdm libx{composite,cb,cursor,damage,dmcp,ext,font,ft,i,inerama,kbfile,klavier,mu,pm,randr,render,res,t,xf86}* lxde* lx{input,menu-data,panel,polkit,randr,session,session-edit,shortcut,task,terminal} obconf openbox gtk* libgtk* alsa* nano python-pygame python-tk python3-tk scratch tsconf
sudo apt-get -y purge aspell hunspell-en-us iptraf libaspell15 libhunspell-1.2-0 lxde lxsession lxtask lxterminal squeak-vm whiptail zenity gdm gnome-themes-standard python-pygame
apt-get --yes purge xdg-tools desktop-file-utils omxplayer python3-numpy python3
sudo apt-get remove xserver-xorg
sudo apt-get purge ^lx
sudo apt-get --yes autoremove
sudo apt-get --yes autoclean
sudo apt-get --yes clean
@TheAshwanik
TheAshwanik / Forward-Reverse-Proxy-Diff.md
Last active March 28, 2018 02:13
Difference between proxy server and reverse proxy server
@TheAshwanik
TheAshwanik / hb-test.py
Created April 8, 2014 15:48 — forked from takeshixx/hb-test.py
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@TheAshwanik
TheAshwanik / Start-Java.sh
Last active April 20, 2017 12:13
Basic Shell Script to start JAVA
#!/bin/sh
BIN_DIR=`dirname "$0"`
BIN_DIR=`( cd "$BIN_DIR" && pwd)`
cd $BIN_DIR/..
# memory settings
HEAP_OPTS="-Xms64m -Xmx512m -XX:PermSize=32m -XX:MaxPermSize=128m"
@TheAshwanik
TheAshwanik / SQLServer2012Diag-InfoQueries
Last active August 29, 2015 13:55 — forked from bendras/gist:3608158
SQL Server 2012 Diagnostic Information Queries
-- http://sqlserverperformance.wordpress.com/tag/dmv-queries/
-- SQL Server 2012 Diagnostic Information Queries
-- Glenn Berry
-- August 2012
-- Last Modified: August 30, 2012
-- http://sqlserverperformance.wordpress.com/
-- http://sqlskills.com/blogs/glenn/
-- Twitter: GlennAlanBerry
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the {internet|net|web} will be {much more|a lot more} useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any? {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe. Thanks.|
{It is|It's} {appropriate|perfect|the best} time to make some plans for the future and {it is|i
var http = require('follow-redirects').http;
//top 1000
var domains = ["google.com","facebook.com","youtube.com","yahoo.com","baidu.com","wikipedia.org","qq.com","linkedin.com","live.com","twitter.com","amazon.com","blogspot.com","taobao.com","google.co.in","sina.com.cn","wordpress.com","yahoo.co.jp","yandex.ru","bing.com","ebay.com","google.de","vk.com","hao123.com","163.com","tumblr.com","pinterest.com","google.co.uk","google.fr","googleusercontent.com","microsoft.com","msn.com","ask.com","mail.ru","google.co.jp","google.com.br","weibo.com","apple.com","paypal.com","google.ru","instagram.com","google.com.hk","xvideos.com","blogger.com","google.it","tmall.com","google.es","imdb.com","soso.com","craigslist.org","sohu.com","360.cn","go.com","amazon.co.jp","stackoverflow.com","bbc.co.uk","xhamster.com","google.com.mx","neobux.com","google.ca","fc2.com","cnn.com","imgur.com","alibaba.com","wordpress.org","flickr.com","espn.go.com","adcash.com","huffingtonpost.com","odnoklassniki.ru","t.co","conduit.com","thepira