Skip to content

Instantly share code, notes, and snippets.

View tris's full-sized avatar

Tristan Horn tris

  • San Francisco, CA
  • 19:47 (UTC -07:00)
View GitHub Profile
@0xced
0xced / UIDevice+serialNumber.h
Last active March 21, 2025 02:27
UIDevice+serialNumber
/*
* Adds the serialNumber property to the UIDevice class
*
* The implementation uses undocumented (for iOS) IOKit functions,
* so handle with caution and be prepared for nil.
*/
#import <UIKit/UIDevice.h>
@interface UIDevice (serialNumber)
@sawicki-maciej
sawicki-maciej / gist:1242279
Created September 26, 2011 13:53
This D-trace script lists all run programs with their arguments - works with OSX
#!/usr/sbin/dtrace -C -s
#pragma D option quiet
proc::posix_spawn:exec-success,proc::__mac_execve:exec-success
{
this->isx64=(curproc->p_flag & P_LP64)!=0;
#define SELECT_64_86(x64, x86) (this->isx64 ? (x64) : (x86))
#define GET_POINTER(base, offset) (user_addr_t)SELECT_64_86(*(uint64_t*)((base)+sizeof(uint64_t)*(offset)), *(uint32_t*)((base)+sizeof(uint32_t)*(offset)))
@scalp42
scalp42 / gist:2495547
Created April 26, 2012 03:33 — forked from ulfmagnetics/gist:2040692
Chef on EC2
# -- assuming homebrew is up and running already
$ brew install ec2-api-tools
# -- get root X509 credentials from the AWS Security Credentials page
# -- place pk and cert pem files in $HOME/.ec2
# -- add the following into $HOME/.bash_profile:
# export REGION='us-west-1'
# export EC2_KEYPAIR="$HOME/.ssh/ec2-$REGION.pem"
@arachsys
arachsys / README
Last active January 7, 2023 16:17
Script to convert IGC files to KML for Google Maps
This content has moved to https://github.com/arachsys/pg-tools/
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */
@robinsmidsrod
robinsmidsrod / gist:6175108
Last active December 20, 2015 18:19
Dynamically loading PCI information with iPXE scripting
#!ipxe
set spaces:hex 20:20:20:20:20:20:20:20:20:20:20:20:20:20:20:20:20:20
clear addr
:load pciscan addr || goto load_done
set vendor ${pci/${addr}.0.2}
set device ${pci/${addr}.2.2}
chain -a pci/${vendor}.ipxe ||
chain -a pci/${vendor}/${device}.ipxe ||
@rxaviers
rxaviers / gist:7360908
Last active April 4, 2026 02:47
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@strayer
strayer / youtube-dl-dash.bash
Last active March 24, 2021 18:00
youtube-dl wrapper script to download DASH Video and Audio and combine it with ffmpeg with automatic best format detection and fallback to default youtube-dl behaviour for videos without DASH
#!/usr/bin/env bash
set -e
YOUTUBE_FORMATS=$(youtube-dl -F "$1")
if [[ "$YOUTUBE_FORMATS" == *"(DASH Video)"* ]]; then
VIDEO_NAME=$(youtube-dl --get-filename "$1")
VIDEO_NAME_TMP="$VIDEO_NAME.tmp"
echo "Filename: $VIDEO_NAME"
#! /usr/bin/env python3
'''pyCookieCheat.py
2015022 Now its own GitHub repo, and in PyPi.
- For most recent version: https://github.com/n8henrie/pycookiecheat
- This gist unlikely to be maintained further for that reason.
20150221 v2.0.1: Now should find cookies for base domain and all subs.
20140518 v2.0: Now works with Chrome's new encrypted cookies.
See relevant post at http://n8h.me/HufI1w
@robinsmidsrod
robinsmidsrod / gist:788eb37babc0fff5b18f
Last active March 23, 2017 08:12
Games menu for my iPXE menu example
############################ GAMES MENU #########################
:menu-games
menu Games for ${initiator-iqn}
item invaders Invaders (Space Invaders clone)
item tint Tint (Tetris clone)
item mineassemble MineAssemble (Minecraft clone, not working)
item
item --key 0x08 back Back to top menu...
iseq ${menu-default} menu-games && isset ${submenu-default} && goto menu-games-timed ||