Skip to content

Instantly share code, notes, and snippets.

@clayne
clayne / perl-memory-modules
Created July 8, 2019 22:55 — forked from jkeroes/perl-memory-modules
Perl memory leaks resources
Tracking memory leaks:
Devel::Arena - sv_stats() returns arena structures used for SV allocation
* Devel::Cycle - find_cycle($ref) returns all cycles found in $ref and the perl variables they point to
Devel::Gladiator - walk Perl variable arena
Devel::Leak - deprecated by Devel::LeakTrace::Fast
Devel::LeakTrace - deprecated by Devel::LeakTrace::Fast
* Devel::LeakTrace::Fast - prints leaked SV's and line numbers at END.
Data::Structure::Util - has_circular_ref($ref) returns ref to link in $ref that is circular or false.
Test::LeakTrace - no_leaks_ok(), etc.
/*
*
* Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's
* prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok.
* Product and Trade Secret source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2014 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement.
*
*/
// Math and base include
#include <Common/Base/hkBase.h>
@clayne
clayne / github_get_all_forks.sh
Created March 19, 2022 17:45 — forked from joeytwiddle/github_get_all_forks.sh
Add all forks of the current repo as remotes
#!/usr/bin/env bash
set -e
# See also: https://github.com/frost-nzcr4/find_forks (same thing but in python)
origin_url="$(git remote show origin | grep 'Fetch URL:' | sed 's+.*: ++')"
full_repo_name="$(echo "$origin_url" | sed 's+.*github.com/++ ; s+\.git$++')"
forks_url="https://api.github.com/repos/${full_repo_name}/forks"
mnemonic | extension | category | isa_set
AAA | BASE | DECIMAL | I86
AAD | BASE | DECIMAL | I86
AAM | BASE | DECIMAL | I86
AAS | BASE | DECIMAL | I86
ADC | BASE | BINARY | I86
ADCX | ADOX_ADCX | ADOX_ADCX | ADOX_ADCX
ADD | BASE | BINARY | I86
ADDPD | SSE2 | SSE | SSE2
ADDPS | SSE | SSE | SSE
mnemonic | extension
AAA | BASE
AAD | BASE
AAM | BASE
AAS | BASE
ADC | BASE
ADCX | ADOX_ADCX
ADD | BASE
ADDPD | SSE2
ADDPS | SSE
clayne@sv590:/tmp/openmw $ time parallel --keep-order "(/tmp/objdump_stats {} | sort -t '$(printf '\t')' -k3,3 -k1,1nr -k2,2) 2>&1 | hpre {}; echo" ::: *.exe
openmw-bulletobjecttool.exe | count mnemonic extension category isa_set
openmw-bulletobjecttool.exe | 12444 JE - - -
openmw-bulletobjecttool.exe | 6673 JNE - - -
openmw-bulletobjecttool.exe | 1566 JA - - -
openmw-bulletobjecttool.exe | 1168 LOCK - - -
openmw-bulletobjecttool.exe | 963 JAE - - -
openmw-bulletobjecttool.exe | 916 MOVABS - - -
o
@clayne
clayne / orthodoxc++.md
Created March 25, 2022 20:16 — forked from bkaradzic/orthodoxc++.md
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@clayne
clayne / git-http-proto.txt
Created April 9, 2022 23:58 — forked from schacon/git-http-proto.txt
Git HTTP transport protocol documentation
HTTP transfer protocols
=======================
Git supports two HTTP based transfer protocols. A "dumb" protocol
which requires only a standard HTTP server on the server end of the
connection, and a "smart" protocol which requires a Git aware CGI
(or server module). This document describes both protocols.
As a design feature smart clients can automatically upgrade "dumb"
protocol URLs to smart URLs. This permits all users to have the
import idaapi
import ida_hexrays
import ida_lines
class MyChoose(idaapi.Choose):
def __init__(self, items, title, cols, icon=-1):
idaapi.Choose.__init__(self, title, cols, flags=idaapi.Choose.CH_MODAL, icon=icon)
self.items = items
def OnClose(self):
@clayne
clayne / idapython_cheatsheet.md
Created May 2, 2022 01:09 — forked from icecr4ck/idapython_cheatsheet.md
Cheatsheet for IDAPython