Skip to content

Instantly share code, notes, and snippets.

View vshymanskyy's full-sized avatar
🇺🇦
#StandWithUkraine

Volodymyr Shymanskyy vshymanskyy

🇺🇦
#StandWithUkraine
View GitHub Profile
@snej
snej / tails.cc
Last active May 8, 2021 18:27
Tails! A tiny Forth core written as a hack for May Forth 2021, using some of Wasm3's secret optimization sauce.
// Tails has grown a bit and moved out into its own repository: https://github.com/snej/tails/
// Please visit it there!
//
// If you want to see the tiny original version from May Forth 2021, it's still here;
// click the "Revisions" button above, or go to:
// https://gist.github.com/snej/9ba59d90689843b22dc5be2730ef0d49/2d55f844b7622aa117b9275bbc9d189613f7ff7f

Trying to deploy WPA3 on my home network

Introduction

Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
@vshymanskyy
vshymanskyy / M5Stack_Espruino.js
Last active February 6, 2024 19:53
M5Stack Espruino initialization example
/*
Also, need to change in ILI9341pal.js:
var LCD_WIDTH = 320;
var LCD_HEIGHT = 240;
*/
BTN1 = D39
BTN2 = D38
BTN3 = D37
SPKR = D25
@vshymanskyy
vshymanskyy / linux_setup.md
Last active May 14, 2021 13:50
Ubuntu Kubuntu Linux Setup

Ubuntu setup

  • Install keyboard layout, Alt+Shift
  • KWin shortcuts - remove Ctrl+F3, Ctrl+F4
  • Remove popping on Vol. Up, Vol. Down
  • Dolphin - use common view properties for all folders

/etc/pulse/default.pa: Comment-out load-module module-suspend-on-idle, run systemctl restart --user pulseaudio

@jun66j5
jun66j5 / main.m
Last active July 25, 2021 08:58
Redirect stdout/stderr to NSLog on iOS Simulator
#include <unistd.h>
static int redirect_nslog(const char *prefix, const char *buffer, int size)
{
NSLog(@"%s (%d bytes): %.*s", prefix, size, size, buffer);
return size;
}
static int stderr_redirect_nslog(void *inFD, const char *buffer, int size)
{
@yurydelendik
yurydelendik / !wasmllvm.md
Last active February 23, 2024 05:08
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
@duckie
duckie / make_function.cpp
Last active December 6, 2020 14:07
C++11 - make_function : template resolution of a callable (function, lambda or functor) to the corresponding std::function
#include <functional>
namespace functional {
template <typename Function> struct function_traits;
template <typename ClassType, typename ReturnType, typename... Args>
struct function_traits<ReturnType(ClassType::*)(Args...) const> {
using function = const std::function<ReturnType(Args...)>;
};