Skip to content

Instantly share code, notes, and snippets.

View shymega's full-sized avatar

Dom Rodriguez shymega

View GitHub Profile
@shymega
shymega / hexmemcalc.c
Last active November 28, 2023 22:52
hexmemcalc
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
* The MIT License (MIT)
*
* Copyright © 2022 Dom Rodriguez (shymega)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
#![feature(const_fn)]
#![feature(const_fn_transmute)]
#[derive(restruct_derive::Struct)]
#[fmt(">B")]
pub(crate) struct U8Serializer;
#[derive(restruct_derive::Struct)]
#[fmt(">H")]
pub(crate) struct U16Serializer;
@shymega
shymega / focal_lengths.sh
Created July 29, 2019 01:31
Photos - collection of one-liners..
#!/usr/bin/env sh
# Iterates over JPG files, grabs lens focal length in metadata, and aappends it to a file.
find ./*.jpg -print -exec exiftool -T -lens -focallength "{}" \; >> lens_focal-lengths.txt;
@shymega
shymega / scrape.py
Last active July 29, 2019 01:22
scrape.py
#!/usr/bin/env python3
# Original code from @sircmpwm
# License: wtfpl
# Modified by @shymega , to print to stdout the top quotes from bash.org - *without* postgresql.
import requests
import sys
from bs4 import BeautifulSoup
@shymega
shymega / keybase.md
Created April 3, 2015 20:56
keybase.md

Keybase proof

I hereby claim:

  • I am shymega on github.
  • I am shymega (https://keybase.io/shymega) on keybase.
  • I have a public key whose fingerprint is EB0D 45E6 D0DC 1BA1 A2B5 FC24 72DC F123 1E54 BD43

To claim this, I am signing this object: