Skip to content

Instantly share code, notes, and snippets.

View kezzyhko's full-sized avatar
💜
💜💜💜🤍🤍 3/5

Sergey Semushin kezzyhko

💜
💜💜💜🤍🤍 3/5
View GitHub Profile
@kezzyhko
kezzyhko / parity_bit.php
Created November 5, 2020 18:16
Script, which checks parity bits, decodes binary to ascii, and puts * for corrupted bytes | http://sandbox.onlinephpfunctions.com/code/5ee7ce353ca66583ab52b6e21b5e4f4326a8608d
<?php
// Available for test at http://sandbox.onlinephpfunctions.com/code/5ee7ce353ca66583ab52b6e21b5e4f4326a8608d
$ins = [
'01010011 01001111 11001100 01000001 01010010 11001001 01010011',
'11010111 11001001 11001110 01000100 01001111 11010111 01010011',
'01000111 01001111 11001111 11000111 11001100 11000101',
'11011001 01000001 01001110 11000100 11000101 11011000',
'01000001 11001101 01000001 01011010 11001111 11001110'
];
@kezzyhko
kezzyhko / VK_liker.js
Created November 5, 2020 19:29
JS script to like every loaded post on https://vk.com
function shuffle(o) {
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
};
var workArray = shuffle(document.querySelectorAll('.like_btn.like:not(.active)'));
var curTaskElement = 0;
function triggerCurElement() {
if (curTaskElement >= workArray.length) {
console.log("Всё!");
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", 6969))
while True:
inS = str(s.recv(1024*1024), 'ascii')
print(inS)
<?php
function random() {
return mt_rand() / mt_getrandmax() * 2 - 1;
}
$a = sqrt(3);
//$a = 1/2.0;
$n = 10000000;
$c = 0;
$Xsum = 0;
@kezzyhko
kezzyhko / a1z9.php
Last active May 11, 2022 11:39
Script for helping breaking a1z9 cipher. It's almost like a1z26, but 1 digit cat be 3 different letters. This particular message was used in "Calculator: The Game".
<?php
$abc = ' abcdefghijklmnopqrstuvwxyz-';
$enc = '719 59 5152 75 754514 732 78562 52 5751267';
$enc = str_replace(' ', '0', $enc);
echo '<pre>';
for ($offset = 0; $offset <= 2; $offset++) {
foreach (str_split($enc) as $char) {
echo $abc[$char*3 + $offset];
<?php
const WORDS = [
3 => 'Fizz',
5 => 'Buzz',
// 2 => 'Vezz',
];
const N = 100;
for ($i = 0; $i <= N; $i++) {
@kezzyhko
kezzyhko / split_gist_logo.js
Created November 20, 2020 16:36
Script, which splits "GitHub Gist" logo in two parts: link to Github and link to Gist
a = document.querySelector('a[aria-label="Gist Homepage "]');
githubSvg = document.querySelector('.octicon-logo-github');
gistSvg = document.querySelector('.octicon-logo-gist');
var githubLink = a.cloneNode(false);
githubLink.href = "https://github.com";
githubLink.appendChild(githubSvg);
var gistLink = a.cloneNode(false);
gistLink.appendChild(gistSvg);
@kezzyhko
kezzyhko / http_post_request.js
Created February 4, 2021 20:23
JS code to make POST requests and rewrite current page to the response
request = new XMLHttpRequest();
request.open("POST", "http://example.com/", true);
request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
request.onreadystatechange = function() {
if (request.readyState == 4) {
document.open();
document.write(request.responseText);
document.close();
console.log("done");
}
<?php
trait SingletonTrait {
final private function __construct() { }
final public static function getInstance(): static {
/** @var static $instance */
static $instance;
@kezzyhko
kezzyhko / telegram_bot.py
Last active July 29, 2022 16:06
Simplest telegram bot, which just replies to all messages
import telebot
import time
TOKEN = "https://youtu.be/dQw4w9WgXcQ"
REPLY_TEXT = "This is the reply"