Skip to content

Instantly share code, notes, and snippets.

View zst123's full-sized avatar

zst123 zst123

View GitHub Profile
@jcmvbkbc
jcmvbkbc / gist:316e6da728021c8ff670a24e674a35e6
Last active November 21, 2023 18:39
esp32s3 linux rebuild scripts
Latest versions of these scripts are available in git repository https://github.com/jcmvbkbc/esp32-linux-build
@RachidAZ
RachidAZ / Elte_Detector.yara
Created January 17, 2022 13:39
Yara file that contains useful rules to detect malicious files
import "pe"
import "math"
private rule IsPE
{
condition:
uint16(0) == 0x5A4D and // MZ
uint32(uint32(0x3C)) == 0x00004550 // PE
}
@N3MIS15
N3MIS15 / beacon.py
Last active March 20, 2024 06:04
micropython iBeacon example
import struct
import ubluetooth as bt
from micropython import const
MANUFACTURER_ID = const(0x004C)
DEVICE_TYPE = const(0x02)
DATA_LENGTH = const(0x15)
BR_EDR_NOT_SUPPORTED = const(0x04)
FLAG_BROADCAST = const(0x01)
MANUFACTURER_DATA = const(0xFF)
@CSQDiv0
CSQDiv0 / install.sh
Created June 21, 2020 08:25
Installation script for CSQ's workshop.
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
cd ~/
#bring up vcan interface
modprobe can
@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);
/* A Verilog VGA module without state machines or weird bit assignments.
* Works with 50MHz clock, 800x600@72Hz. */
module vga(clk, in_R, in_G, in_B, out_R, out_G, out_B, Hsync, Vsync, video_on, x, y);
input clk, in_R, in_G, in_B;
output wire out_R, out_G, out_B, Hsync, Vsync, video_on;
output reg[9:0] x, y;
/* counters. increment y at the start of hsync. reset x at the end of front porch. */
int led1 = 2;
int led2 = 3;
void setup() {
Serial.begin(115200);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
for(int i = 0;i < 3; i++)
{
flashGreen(100);
void setup() {
Serial.begin(115200);
pinMode(13,OUTPUT);
digitalWrite(13,HIGH);
delay(10000);
Serial.println("GLITCH RDY");
}
int glitchCtr = 0;
int secCtr = 1;
@darthoctopus
darthoctopus / ipynb.js
Last active January 27, 2022 04:52
iPython Notebook viewer for gnome-sushi; requires Jupyter and nbconvert installed.
/*
* Copyright (C) 2011 Red Hat, Inc; 2016 Joel Ong
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of