Skip to content

Instantly share code, notes, and snippets.

View fpillet's full-sized avatar

Florent Pillet fpillet

View GitHub Profile
@zcutlip
zcutlip / lldb-hand-rolled-headers.md
Last active January 25, 2021 13:38
Importing Hand-Rolled C Header Files in LLDB

Importing Hand-Rolled C Header Files in LLDB

Scenario

  • We're debugging a dylib, libhello.dylib
  • The dylib is linked from hello
  • The exported function is helloworld()
  • We do not have source, but have reversed a struct from the library and created a hand-crafted header file

Header File

@zwaldowski
zwaldowski / Extra Logging for My Great App.mobileconfig
Last active October 11, 2024 08:09
Apple Configuration Profile for Logging in iOS 10 and macOS Sierra
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- iOS 10, macOS Sierra, and friends bring a new logging subsystem that's
supposed to scale from the kernel, up to frameworks, and up to apps. It defaults
to a more regimented, privacy-focused approach that large apps and complex
systems need.
It, along with Activity Tracing introduced in iOS 8 and macOS Yosemite and the
Console app in macOS Sierra, hope to help you graduate from caveman debugging to
@andymatuschak
andymatuschak / MultiDirectionAdjudicatingScrollView.swift
Created January 26, 2015 19:31
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@indragiek
indragiek / LTClientBrowser.h
Last active August 29, 2015 14:01
ReactiveCocoa-based wrapper around NSNetServiceBrowser
//
// LTClientBrowser.h
// LayerTreeServer
//
// Created by Indragie Karunaratne on 2014-05-21.
// Copyright (c) 2014 Indragie Karunaratne. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <LayerTreeKit/LayerTreeKit.h>
@chrismiles
chrismiles / reveal.py
Last active September 2, 2021 00:26
Lazy script to wrap Reveal lib load/start commands in one LLDB command.
""" File: reveal.py
Add to ~/.lldbinit:
command script import ~/.lldb-scripts/reveal.py
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode?
A: In Xcode:
Add a Symbolic Breakpoint
Symbol: "UIApplicationMain"
Action: Debugger Command with value "reveal"
@steipete
steipete / DevelopmentEnviromentDetector.m
Last active October 30, 2019 03:49
Detect if you're currently running a development version or an App Store/Ad Hoc version.
static BOOL PSPDFIsDevelopmentBuild(void) {
#if TARGET_IPHONE_SIMULATOR
return YES;
#else
static BOOL isDevelopment = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
// There is no provisioning profile in AppStore Apps.
NSData *data = [NSData dataWithContentsOfFile:[NSBundle.mainBundle pathForResource:@"embedded" ofType:@"mobileprovision"]];
if (data) {
@datagrok
datagrok / git-serve.md
Last active April 21, 2023 07:33
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
@paragontechgroup
paragontechgroup / cf-global-tokens.txt
Created November 8, 2011 16:09
Command Fusion Global Tokens
// 1) Created global token (in global token manager) called "ProcessorPort" with default value 8020 and checked persist.
// 2) Created system called "Localhost" to 127.0.0.1
// 3) Created setup page with text input field with serial join 9999 with command "setPort" in "Send Value Actions > command"
// 4) Created command in "Localhost" system called "setPort" with following Javascript:
CF.setToken(CF.GlobalTokensJoin, "[ProcessorPort]", "[@s9999]");
// 5) Made button on setup page called "What is my port" with code:
CF.getJoin(CF.GlobalTokensJoin, function(j, v, tokens) { var guiPort = tokens["[ProcessorPort]"]; CF.setJoins([{join: "s590", value: guiPort}]); });
// This grabs the global token "[ProcessorPort]" and displays it in serial join s590 for testing. All works like a champ until I restart guiDesigner. I'd assume that from a fresh start and navigating to the setup page and pressing the "What is my port" button that the set persistent global token value would be displayed. Also, even from a fresh start p
@alq666
alq666 / gist:1199208
Created September 6, 2011 22:43
La liste des sources supportées par Datadog

Mise à jour 2011-09-06. On ajoute des nouvelles sources régulièrement, en fonction de la demande.

OS

  • System stats for linux Centos/Redhat 5 & 6, Ubuntu >= 10.04 LTS

Online services