Skip to content

Instantly share code, notes, and snippets.

View samyk's full-sized avatar

samy kamkar samyk

View GitHub Profile
#include <M5Core2.h>
#include <Preferences.h>
#include <Fonts/EVA_20px.h>
#include <stdio.h>
#include <Kalman.h> // https://github.com/TKJElectronics/KalmanFilter
#define ENCx_A 35
#define ENCx_B 36
SetDirectory[NotebookDirectory[]];
\[Theta]0 = -.1 \[Pi]; \[Phi]0 = .35*\[Pi];
\[Psi]0 = {Cos[\[Theta]0] Cos[\[Phi]0], Sin[\[Theta]0] Cos[\[Phi]0],
Sin[\[Phi]0]};
Clear[BlochSphereVector];
BlochSphereVector[\[Psi]_, imSize_ : 1000, color_ : Gray,
opacity_ : 1, \[Phi]view_ : \[Pi]/4, viewdist_ : 100] := Module[{
tubeball, pointline,
@0x36
0x36 / oob_events.c
Created November 5, 2020 23:16
IOAccelContext2::finish_fence_event() race condition OOB read/write
#if 0
IOAccelContext2::finish_fence_event() race condition OOB read/write
This is a method exposed to user space, it takes a kernel read-only shared memory
(type 2 via clientMemoryForType()) address and treats it as an IOAccelEvents Array.
The user supplied index is checked against the IOAccelEvents array bounds,since there are no
locks held in this method,it is possible to change the array bounds by calling
IOAccelContext2::clientMemoryForType() again in a separate thread, this will expand the size by
multiplying the older size by 2, but we still have a reference to the old shared memory address
@valgaze
valgaze / GTA5VR_101.md
Last active March 31, 2025 05:45
GTA5 VR (R.E.A.L.)

Quickstart

Step 0: Pre-requisites

  • Get a tool that can unpack Rar files (A good option is WinRar but many others exist as well)

  • Install a clean copy (ideally no modifications to start) of GTAV & note the location where GTA5.exe is installed

Note: At time of writing, the mod is compatible with the latest game update released by Rockstar on Aug 11, 2020 v1.0.2060.0 & should be work previous versions down to 1.0.1180.2)

// FM11RF005SH dump tool for libnfc
// Made by Marcos Del Sol Vives <[email protected]>
// License: WTFPL 2.0
#include <stdio.h>
#include <stdint.h>
#include <nfc/nfc.h>
int main(int argc, char ** argv) {
int ret = 1;
@nitheeshkl
nitheeshkl / gige_gst_v4l.md
Last active March 16, 2025 19:12
Gstreamer pipelines to use GigE cams as webcam for Zoom/Teams/Skype

Using GigE cam as webcam for Zoom/Skype/Teams

TL;DR: Creates a Gstreamer pipeline to read camera frames from a GigE camera, using Aravis library, and publish them as V4l2 camera source, using V4l2loopback, that can be read by video conferencing programs like Zoom/Skype/Teams.

gst-launch-1.0 aravissrc blocksize=5013504 h-binning=1 v-binning=1 ! video/x-bayer,format=rggb,framerate=100/5,width=2448,height=2048 ! bayer2rgb ! video/x-raw,format=RGBx ! videoconvert ! video/x-raw,format=YUY2 !  aspectratiocrop aspect-ratio=16/9 ! videoscale ! video/x-raw,width=1280,height=720 ! queue ! v4l2sink device=/dev/video0

The Basics

@Macorreag
Macorreag / animacionconmani.ipynb
Last active October 4, 2022 01:36
Configuración de Colab para crear animaciones con la librería de manim
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import Foundation
import CoreNFC
import RxSwift
import RxCocoa
private enum TransceiveType: UInt8 {
case read = 0x30
case write = 0xA2
case auth = 0x1B
}
@yoavst
yoavst / dragonblood.md
Created May 30, 2020 16:13
Implementing Dragonblood

Implementing Dragonblood CVE-2019-9494 - Review

Background

As part of the Advance Workshop in Implementation of Cryptographic Attacks, we were instructed to implement a cache side channel attack library. As a demonstration, we attempted to implement the exploit in CVE-2019-9494[0], using our Cache side channel attack library "Artik" [1].

While we were able to implement the procedure as specified in the paper[2], we were unable to recreate the results described there. In the following review, we are to go over our attempt.

Setup