This file contains hidden or 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 | |
class ParentClass { | |
protected $a = 1; | |
public function doSomething() { | |
echo "I'm the parent"; | |
$this->a = 2; | |
} | |
} |
This file contains hidden or 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
WIP |
This file contains hidden or 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 -v : | |
Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gv.so' - /usr/lib64/php/modules/gv.so: undefined symbol: zend_error_noreturn in Unknown on line 0 | |
PHP 5.3.6 (cli) (built: Mar 23 2011 13:12:50) | |
Copyright (c) 1997-2011 The PHP Group | |
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies | |
Fedora 15 |
This file contains hidden or 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
// Assuming you have Jquerified the page | |
// http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet | |
function deleteApp(tab, index) { | |
tab[index].click(); | |
setTimeout(function() { | |
$jq("input[name=remove]").click(); | |
setTimeout(function() { | |
$jq("input[name=ok]").click(); | |
if (tab[index + 1]) { |
This file contains hidden or 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 <iostream> | |
class Dad | |
{ | |
public: | |
Dad() | |
{ | |
this->hello(); | |
} |
This file contains hidden or 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
user = User.find(42) | |
article = Article.find(1337) | |
user.can?(:read, article) # Can the user read this article? false for now | |
user.can(:read, article) # Ok, so the user can read this article | |
user.can(:edit, article) # He can edit it as well | |
user.can?(:read, article) # Will be true |
This file contains hidden or 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
Model.where('my_string LIKE BINARY ?', "This is a Test String") |
This file contains hidden or 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
local_var.method_with_hash_and_block( | |
mandatory_param, | |
option_1: a, | |
option_2: blabla, | |
option_3: blablablablablabla, | |
option_4: bblablablablablablablabla, | |
option_5: bblablablabla) do |v| | |
d = v.bla | |
e = v.bla | |
end |
This file contains hidden or 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
while true; do curl -F 'back=my-account&[email protected]&passwd=lalala42&SubmitLogin=toto' 'http://demo-store.prestashop.com/en/index.php?controller=authentication' -H "Content-Type:application/x-www-form-urlencoded" &;done |
This file contains hidden or 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
class RuboCop::Cop::Security::LinkToBlank < RuboCop::Cop::Cop | |
MSG = 'Specify a `:rel` option containing noopener.'.freeze | |
def_node_matcher :link_to?, <<-PATTERN | |
(send nil? :link_to ...) | |
PATTERN | |
def_node_matcher :blank_target?, <<-PATTERN | |
(pair {(sym :target) (str "target")} (str "_blank")) | |
PATTERN |
OlderNewer