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
[ req ] | |
default_bits = 2048 | |
default_keyfile = server-key.pem | |
distinguished_name = subject | |
req_extensions = req_ext | |
x509_extensions = x509_ext | |
string_mask = utf8only | |
[ subject ] |
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
pragma solidity >=0.4.22 <0.7.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { | |
uint256 number; |
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
/* Data from http://eloquentjavascript.net/code/#4 */ | |
/* phi logic from http://www.pmean.com/definitions/phi.htm */ | |
var JOURNAL = [ | |
{"events":["carrot","exercise","weekend"],"squirrel":false}, | |
{"events":["bread","pudding","brushed teeth","weekend","touched tree"],"squirrel":false}, | |
{"events":["carrot","nachos","brushed teeth","cycling","weekend"],"squirrel":false}, | |
{"events":["brussel sprouts","ice cream","brushed teeth","computer","weekend"],"squirrel":false}, | |
{"events":["potatoes","candy","brushed teeth","exercise","weekend","dentist"],"squirrel":false}, | |
{"events":["brussel sprouts","pudding","brushed teeth","running","weekend"],"squirrel":false}, |
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
{"editor.formatOnSave": false, | |
"editor.detectIndentation": true, | |
"editor.fontSize": 15, | |
"editor.lightbulb.enabled": true, | |
"editor.parameterHints.enabled": true, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.rulers": [], | |
"editor.snippetSuggestions": "top", | |
"editor.wordBasedSuggestions": false, |
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
$logo = isset($_FILES['logo']) ? $_FILES['logo'] : null; | |
if ($logo['size'] > 300000) { | |
echo 'File size too large'; | |
return; | |
} | |
$type = explode('/', $logo['type']); |
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
foreach ($_REQUEST as $key => $value) { | |
$ex = explode('_',$key); | |
foreach ($ex as $k => $v) { | |
if($v == 'url'){ | |
$url = filter_var($value,FILTER_VALIDATE_URL,FILTER_FLAG_HOST_REQUIRED); | |
if(!$url){ |
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
function sanitize($data){ | |
trim($data); | |
htmlspecialchars($data); | |
htmlentities($data); | |
strip_tags($data); | |
return $data; | |
} | |
NewerOlder