Skip to content

Instantly share code, notes, and snippets.

@aquiles2k
aquiles2k / application_controller.rb
Created January 29, 2024 08:37 — forked from tonyfg/application_controller.rb
Log Rails object allocations during a request
class ApplicationController < ActionController::Base
around_action :track_object_allocation
def allocation_logger
@@allocation_logger ||= begin
logger = Logger.new("#{Rails.root}/log/allocation_trace.log")
logger.formatter = proc { |_severity, _datetime, _progname, msg|
"#{msg}\n"
}
logger
@aquiles2k
aquiles2k / APDUList.txt
Created January 22, 2024 12:05 — forked from hemantvallabh/APDUList.txt
APDU list
Cheef's Grand APDU List Smartcard Selected Information APDU list
Reference: http://web.archive.org/web/20090630004017/http://cheef.ru/docs/HowTo/APDU.info
#------------+------------------------+------------------------+----------------------+--------------------------------+
|ClaIns P1 P2|Lc Send Data |Le Recv Data | Specification | Description |
+------------+------------------------+------------------------+----------------------+--------------------------------+
| 04 | ISO 7816-9 6.3 | DEACTIVATE FILE |
| A0 04 00 00 00 | 3GPP TS 11.11 | INVALIDATE |
| A0 04 00 00 00 | SAGEM SCT U34 6.15 | INVALIDATE |
+------------+------------------------+------------------------+----------------------+--------------------------------+
@aquiles2k
aquiles2k / qtwebkitnew-1-fixes.patch
Created November 12, 2018 10:58
Basic QtWebKit 5.212 mxe build file - no static tested, copy after build needed
--- a/Source/WTF/wtf/CurrentTime.cpp.orig 2017-02-07 20:18:29.395887200 +0300
+++ b/Source/WTF/wtf/CurrentTime.cpp 2017-02-07 20:20:03.241254800 +0300
@@ -91,6 +91,35 @@
#if USE(QUERY_PERFORMANCE_COUNTER)
+#if defined(_WIN32) && (defined(__x86_64__) || defined(_AMD64_)) && _WIN32_WINNT < 0x0600
+/* GetTickCount64() is not available on XP. */
+ULONGLONG GetTickCount64 ()
+{
@aquiles2k
aquiles2k / gist:8287891853701c8e69793e41e52b099a
Created March 19, 2018 17:12 — forked from wycats/gist:1627976
How to debug dynamic loading
export DYLD_PRINT_OPTS="1"
export DYLD_PRINT_ENV="1"
export DYLD_PRINT_LIBRARIES="1"
export DYLD_PRINT_LIBRARIES_POST_LAUNCH="1"
export DYLD_PRINT_APIS="1"
export DYLD_PRINT_BINDINGS="1"
export DYLD_PRINT_INITIALIZERS="1"
export DYLD_PRINT_REBASINGS="1"
export DYLD_PRINT_SEGMENTS="1"
export DYLD_PRINT_STATISTICS="1"
int idealDistance(QPointF p_start, QPointF p_end) {
DBThreadRef dbThread = OSMScoutQt::GetInstance().GetDBThread();
int distance = 0;
dbThread->RunSynchronousJob([dbThread, p_start, p_end, &distance](const std::list<DBInstanceRef>& databases) {
if (databases.size() > 0) {
DBInstanceRef db = databases.front();
projekte git clone https://github.com/Framstag/libosmscout.git ./libosm3
Cloning into './libosm3'...
remote: Counting objects: 36132, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 36132 (delta 2), reused 0 (delta 0), pack-reused 36118
Receiving objects: 100% (36132/36132), 12.34 MiB | 5.26 MiB/s, done.
Resolving deltas: 100% (24644/24644), done.
Checking connectivity... done.
➜ projekte cd libosm3
➜ libosm3 git:(master) source ./setupAutoconf.sh
Process: OSMScout [92025]
Path: /Users/USER/*/OSMScout.app/Contents/MacOS/OSMScout
Identifier: com.yourcompany.OSMScout
Version: ???
Code Type: X86-64 (Native)
Parent Process: zsh [6720]
Responsible: iTerm2 [481]
User ID: 501
Date/Time: 2017-01-17 12:55:11.360 +0100
adrian@n00b MSYS ~
$ cd dev
adrian@n00b MSYS ~/dev
$ git clone https://github.com/Alexpux/MINGW-packages.git
Klone nach 'MINGW-packages' ...
remote: Counting objects: 36399, done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 36399 (delta 13), reused 0 (delta 0), pack-reused 36358