This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Using gem aws-sdk for a ror application for uploading images to s3 | |
#Uploading images to a fixed bucket with different folders for each object or application. | |
#The s3 keeps a limitation on the number of buckets creattion whereas there is no | |
#limitation for content inside a bucket. | |
#This code will upload image for a user to s3 using aws-sdk gem. The bucket and the image uploaded are made public | |
#so that the images uploaded are directly accessible. The input it takes is the image complete path | |
#where it is present, folder in which it should be uploaded and user_id for whom it should | |
#be uploaded. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Full Contol on Ethnet, IP & TCP headers. Play with it ;) | |
# to test it: nc -lvp 4444 | |
# as root: tcpdump -nvvvv 'tcp port 4444' -i wlan0 # change wlan0 to your interface | |
# or use packetfu to monitor as tcpdump | |
# on OSX exchange wlan0 to en0 | |
## cap = PacketFu::Capture.new(:iface => 'wlan0' , :promisc=> true) | |
## cap.show_live(:filter => 'tcp and port 4444') | |
# libpcap should be installed | |
# gem install pcaprub packetfu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
### | |
# NOTE: This code won't work with PHP 7. | |
# MySQL is deprecated and will be removed in PHP 7 checkout MySQLi. | |
### | |
############## JUST FILL THESE VARIABLES ###### | |
$dbname = 'name'; # Name of the Database in the MySQL Server | |
$dbuser = 'user'; # User name of the database in MySQL | |
$dbpass = 'pass'; # Password for the user of in database in MySQL | |
$dbhost = 'host'; # url/link to database |