Skip to content

Instantly share code, notes, and snippets.

View gauravssnl's full-sized avatar
😸
use code::latest ;

GAURAV gauravssnl

😸
use code::latest ;
View GitHub Profile
@liamcottle
liamcottle / attestation.md
Last active August 21, 2024 11:11
SafetyNet Attestation Bypass

SafetyNet Attestation Bypass

Proof that with a few hours work, you can easily provide aribitrary data to the Google SafetyNet API and receive a valid Attestation signed by attest.android.com.

I've captured the HARDWARE_BACKED flag. Check this comment.

This is only a software backed attestation, as you can see with the evaluationType=BASIC. I don't have any devices that support hardware backed attestations via TEE, however once I do, I'll be taking a look into them 🤠

@raysan5
raysan5 / raylib_api_usage_analysis.md
Last active December 10, 2024 15:15
raylib API usage analysis

raylib_api_usage_analysis

raylib API usage analysis

How is raylib API used out there? What are the most popular function calls? And the less used ones? What new API calls made an impact? Which ones get completely ignored by the users?

raylib has grown in the last years from 80 API functions to 475 API functions. Did the users adapted to that amount of improvements? Did the new features fit their needs?

I was looking for some answer so I decided to do a quick market analysis of raylib API usage, actually it was a nice weekend project. I decided to analyse some public GitHub projects using raylib.

@zserge
zserge / ray.cc
Last active April 9, 2024 11:49
Minimal ray tracer for leaning purposes
#include <array>
#include <cmath>
#include <fstream>
#include <iostream>
#include <vector>
struct Vec {
float x, y, z;
Vec(float vx, float vy, float vz) : x(vx), y(vy), z(vz) {}
Vec operator+(Vec vec) { return {x + vec.x, y + vec.y, z + vec.z}; }
@lotabout
lotabout / traceroute.py
Created March 13, 2021 07:13
Simple traceroute implementation in Python3
#!/usr/bin/env python3
import struct
import socket
import time
# Need to run with root permission cause RAW socket is used
# ref:
# - https://dnaeon.github.io/traceroute-in-python/
@lotabout
lotabout / ping.py
Last active December 24, 2023 06:08
Simple ping implementation in python3 for practicing TCP/IP
#!/usr/bin/env python3
import os
import struct
import socket
import time
def checksum(bytestr):
# ref
# - https://en.wikipedia.org/wiki/IPv4_header_checksum
@passcod
passcod / CARETAKERS.md
Last active December 29, 2021 17:28
Caretaker maintainership in a nutshell

Caretaker Maintainership

(If this file is included in a project, you can find the list of current caretakers at the bottom.)

In a small classical open-source project, maintainers do a lot, and if maintainers don't have time to do a lot, usually the project stalls. Finding new maintainers is hard because few people actively want to take over all the responsibilities of a project. There must be a different way.

With Caretaker Maintainership, "Maintainers" become "Caretakers". Caretakers' only mandatory responsibility is to grant Releasers commit and publish access to the project.

@FreddieOliveira
FreddieOliveira / docker.md
Last active May 16, 2025 12:31
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

// ==UserScript==
// @name GitHub checklist highlighter 595491
// @version 5
// @grant none
// @include https://github.com/*
// ==/UserScript==
(function f() {
var taskListItems = document.getElementsByClassName("task-list-item enabled");
@kprotty
kprotty / ParkingLot.zig
Last active October 5, 2024 09:17
Small & Fast synchronization primitives for Zig
pub fn ParkingLot(comptime Config: type) type {
return struct {
pub const Lock: type = Config.Lock;
pub const Event: type = Config.Event;
pub const nanotime: fn() u64 = switch (@hasDecl(Config, "nanotime")) {
true => Config.nanotime,
@carstein
carstein / main.rs
Last active August 25, 2024 18:47
Example code in Rust using fork and ptrace
use nix::sys::ptrace;
use nix::sys::signal::Signal;
use nix::sys::wait::{WaitStatus, wait};
use nix::unistd::{fork, ForkResult, Pid};
use std::collections::HashMap;
use std::ffi::c_void;
use std::os::unix::process::CommandExt;
use std::process::{Command, exit};