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 / 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
@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
#!/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 / README.md
Last active September 8, 2015 10:31 — forked from mbostock/.block
Collapsible Tree
@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 / wifi
Created October 2, 2015 05:42
Spoof on a paid/public Wifi
* Launch Terminal.
* Check your own MAC address:
ifconfig en1 | grep ether
* See who else is on the network:
arp -a
@TheAshwanik
TheAshwanik / category_cloud.rb
Last active December 11, 2015 09:18
category_cloud.rb updated for tag_cloud also.
module Jekyll
class CategoryCumulusCloud < Liquid::Tag
def initialize(tag_name, markup, tokens)
.
.
.
super
end
@TheAshwanik
TheAshwanik / JAVA-OutOfMemoryErrorDiagnostic
Last active December 16, 2015 19:50 — forked from rednaxelafx/command_prompt
JAVA-OutOfMemoryErrorDiagnostic
$ cat > OOM.java
import java.util.*;
public class OOM {
public static void main(String[] args) throws Exception {
ArrayList list = new ArrayList();
while (true) { list.add(new byte[20000]); }
}
}
# A small DSL for helping parsing documents using Nokogiri::XML::Reader. The
# XML Reader is a good way to move a cursor through a (large) XML document fast,
# but is not as cumbersome as writing a full SAX document handler. Read about
# it here: http://nokogiri.org/Nokogiri/XML/Reader.html
#
# Just pass the reader in this parser and specificy the nodes that you are interested
# in in a block. You can just parse every node or only look inside certain nodes.
#
# A small example:
#
https://gist.github.com/TheAshwanik/83158a902e031becad80
https://gist.github.com/TheAshwanik/5985543
https://gist.github.com/TheAshwanik/58875b12848dfc972afe
https://gist.github.com/TheAshwanik/4578668