Skip to content

Instantly share code, notes, and snippets.

View mandalm's full-sized avatar

Mithun Mandal mandalm

View GitHub Profile
@mandalm
mandalm / iSQL.Output.sql
Created July 27, 2016 17:23 — forked from zmak/iSQL.Output.sql
iSQL Output Syntax
OUTPUT TO filename
[ APPEND ] [ VERBOSE ]
[ FORMAT output-format ]
[ ESCAPE CHARACTER character ]
[ DELIMITED BY string ]
[ QUOTE string [ ALL ] ]
[ COLUMN WIDTHS ( integer, … ) ]
[ HEXADECIMAL { ON | OFF | ASIS } ]
[ ENCODING encoding ]
@mandalm
mandalm / genhttplogs.rb
Created July 22, 2016 05:33 — forked from fetep/genhttplogs.rb
apache log generator
#!/usr/bin/ruby
class IPGenerator
public
def initialize(session_count, session_length)
@session_count = session_count
@session_length = session_length
@sessions = {}
end
@mandalm
mandalm / gist:0edbbe592c8867a4ed4d36bcda40b1e4
Created July 22, 2016 05:32 — forked from gwenshap/gist:11390102
Generate fake apache access logs
#!/usr/bin/python
import time
import datetime
import random
timestr = time.strftime("%Y%m%d-%H%M%S")
f = open('access_log_'+timestr+'.log','w')
ips=["123.221.14.56","16.180.70.237","10.182.189.79","218.193.16.244","198.122.118.164","114.214.178.92","233.192.62.103","244.157.45.12","81.73.150.239","237.43.24.118"]
referers=["-","http://www.casualcyclist.com","http://bestcyclingreviews.com/top_online_shops","http://bleater.com","http://searchengine.com"]