Skip to content

Instantly share code, notes, and snippets.

View ishukshin's full-sized avatar

ishukshin ishukshin

View GitHub Profile
@ishukshin
ishukshin / izbirkom_fingerprint.html
Created August 2, 2022 22:51
HTML, добавляемый на сайте ЦИК для составления "отпечатка пальца" посетителя сайтов с составами избиркомов и с результатами выборов
<div style="display: block !important;"><div id="Iklan-Melayang"></div></div><div style="display: block !important;"><div id="Kolom-Iklan-728"></div></div><div style="display: block !important;"><div id="SidebarIklan-wrapper"></div></div><div style="display: block !important;"><a title="7naga poker"></a></div><div style="display: block !important;"><div title="ALIENBOLA"></div></div><div style="display: block !important;"><div id="quangcaomb"></div></div><div style="display: block !important;"><div class="i-said-no-thing-can-stop-me-warning dark"></div></div><div style="display: block !important;"><div class="quangcao"></div></div><div style="display: block !important;"><div href="https://r88.vn/"></div></div><div style="display: block !important;"><div href="https://zbet.vn/"></div></div><div style="display: block !important;"><div class="mainostila"></div></div><div style="display: block !important;"><div class="sponsorit"></div></div><div style="display: block !important;"><div class="ylamainos"></div></di
curl 'https://free.navalny.com/api/v1/maps/counters/' --silent \
-H 'authority: free.navalny.com' \
-H 'sec-ch-ua: "Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"' \
-H 'accept: application/json' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36' \
-H 'content-type: application/json' \
-H 'sec-fetch-site: same-origin' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
<?php
use Request;
use Validator;
use \GuzzleHttp\Client;
// ... in the boot()
Validator::extend('recaptcha', function($attribute, $value, $parameters, $validator) {
if(!$value) {
return false;
}
@ishukshin
ishukshin / esp8266-eeprom-webserver.ino
Created June 16, 2018 19:54
Simple webserver at esp8266. Saves value in EEPROM and auto-updates input value in open browsers if changed by any user or the system.
#include <ESP8266WiFi.h> //Содержится в пакете
#include <ESP8266WebServer.h> //Содержится в пакете
#include <ESP8266SSDP.h>
#include <EEPROM.h>
// IP адрес устройства
IPAddress apIP(192, 168, 4, 1);
// Web интерфейс для устройства
ESP8266WebServer HTTP(80);
@ishukshin
ishukshin / JsonAppend.php
Last active May 30, 2018 20:31
Testing of different methods of appending data to a json file
<?php
...
private function _appendJson($file, $data, $first = false) {
$fd = fopen($file, 'r+');
fseek($fd, -1, SEEK_END);
fwrite($fd, ($first ? '' : ',') . json_encode($data) . ']');
fclose($fd);
}
// wrong file format. Just measuring speed
@ishukshin
ishukshin / ElectionService.php
Created May 19, 2018 01:02
Making json files concerning Russian presidental elections-2018 using laravel artisan
<?php
namespace App\Services;
use Cache;
use Storage;
class ElectionService {
/**
@ishukshin
ishukshin / AntiDos.php
Created May 3, 2018 16:15
Simple laravel app filtering of bad clients using middleware
<?php
// app/Http/Middleware/AntiDos.php
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Closure;
use File;
class AntiDos
{
@ishukshin
ishukshin / marcha_imperial
Created January 2, 2018 11:06 — forked from tagliati/marcha_imperial
Marcha imperial para arduino
int ledPin = 13;
//led for visualization (use 13 for built-in led)
int speakerPin = 11;
//speaker connected to one of the PWM ports
#define c 261
#define d 294
#define e 329
#define f 349
@ishukshin
ishukshin / Arduino Song
Created January 2, 2018 11:06 — forked from eznj/star_wars.ino
Arduino Star Wars Song for Piezo
**/
const int c = 261;
const int d = 294;
const int e = 329;
const int f = 349;
const int g = 391;
const int gS = 415;
const int a = 440;
const int aS = 455;
<html>
<head>
<style>
#console{
border:1px solid lightgreen;
padding:10px;
}
</style>
</head>
<body>