Skip to content

Instantly share code, notes, and snippets.

View shamim71's full-sized avatar

Shamim Ahmmed shamim71

View GitHub Profile
@shamim71
shamim71 / wifiscan.py
Last active August 29, 2015 14:16 — forked from gleicon/wifiscan.py
from scapy.all import *
PROBE_REQUEST_TYPE=0
PROBE_REQUEST_SUBTYPE=4
def PacketHandler(pkt):
if pkt.haslayer(Dot11):
if pkt.type==PROBE_REQUEST_TYPE and pkt.subtype == PROBE_REQUEST_SUBTYPE: #
PrintPacket(pkt)
@shamim71
shamim71 / Creating Eclipse Project from Maven pom file
Last active August 29, 2015 14:06
Creating Eclipse Project from Maven pom file
mvn eclipse:eclipse -DdownloadSources -DdownloadJavadocs
@shamim71
shamim71 / screen command for Raspberry PI
Created August 5, 2014 15:58
Linux Screen command for Raspberry PI
1. Download screen if not exist.
$sudo apt-get install screen
2. Starting a new Screen.
$screen bash
3. Detached a terminal session.
CTRL + A release, and then press D
4. List all terminal session
$ screen -list
5. Reconnect screen
$ screen -r
@shamim71
shamim71 / Playing sound file in Raspberry PI
Last active August 29, 2015 14:01
Playing sound file in Raspberry PI
#Installaing Driver
sudo apt-get install alsa-utils
#Loading driver module
sudo modprobe snd_bcm2835
#Pointing output port to analog output.
# sudo amixer cset numid=3 <n>
# Where <n> is the required interface : 0=auto, 1=analog, 2=hdmi. To force the Raspberry Pi to use the analog output :
@shamim71
shamim71 / Opening Port on Linux server
Last active August 29, 2015 14:01
Opening port in Linux
Opening port in Linux
iptables -I INPUT 5 -i eth0 -p tcp --dport 8080 -m state --state NEW,ESTABLISHED -j ACCEPT
service iptables save
service iptables restart
iptables --line -vnL
// convenient Spring JDBC RowMapper for when you want the flexibility of Jackson's TreeModel API
// Note: Jackson can also serialize standard Java Collections (Maps and Lists) to JSON: if you don't need JsonNode,
// it's simpler and more portable to have Spring JDBC simply return a Map or List<Map>.
package org.springframework.jdbc.core;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;