Skip to content

Instantly share code, notes, and snippets.

View loderunner's full-sized avatar
👨‍💻
𝚌𝚘𝚍𝚎 𝚕𝚒𝚏𝚎

Charles Francoise loderunner

👨‍💻
𝚌𝚘𝚍𝚎 𝚕𝚒𝚏𝚎
View GitHub Profile

Recettes pour l'apéro

Guacamole

  • 2-3 avocats bien murs
  • jus d'1 citron vert
  • 1 petite échalote (ou 1/2 grosse)
  • 1-2 gousses d'ail
  • coriandre fraiche (généreusement)
  • une pincée de poivre de cayenne (alternativement, piments frais en fines lanières)

GOTO challenge

Problem

Suppose a function that does the following, assuming all operations can fail and none can block:

  • Allocate XXX bytes of memory (on the heap)
  • Open file for reading
  • Read file into allocated buffer
  • Acquire lock
-------- START OF LOG --------
17:02:16 LOG: Core version: $Version: Talos_PC_distro; Talos_Executables-OSX-Final; 300763 2017-04-13 14:14:40 @builderm04.croteam.local; OSX-x86-Static-Final-Default$
17:02:16 LOG: Command: $
17:02:16 LOG: Initializing timer.
17:02:16 LOG: Timestamp: 2017/04/16 17:02:16
17:02:16 LOG: Binary name: Talos
17:02:16 LOG: Binary soft path: Bin/
Foo::Foo()
: _impl(Foo::createImplementation())
{
}
void Foo::platform_independent() {
// do some stuff that is the same on all platforms
}
void Foo::platform_specific() {
@interface NotRedundant
@property (nonatomic, strong) NSString* title;
@end
@implementation Redundant
@end
import random
import string
import os
import os.path
import binascii
MAX_DEPTH=6
MIN_DIRS=1
MAX_DIRS=5
MIN_FILES=1
com.apple.WebKit(2176) deny file-read-data /Applications/Safari.app
Process: com.apple.WebKit [2176]
Path: /System/Library/Frameworks/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.Networking.xpc/Contents/MacOS/com.apple.WebKit.Networking
Load Address: 0x10b632000
Identifier: com.apple.WebKit.Networking
Version: 11601.5.17.1 (11601)
Build Info: 1-WebKit2~7601005017001000
Code Type: x86_64 (Native)
Parent Process: launchd [1]
  • Pizza
  • Sushis/makis
  • Ramens
  • Pates vivantes
  • kebab
  • burger
  • Ometis
  • pâtes
  • sandwich
  • Bagel
@loderunner
loderunner / osx-ld.md
Last active May 5, 2024 12:02
potential blog posts

ld – Wading through Mac OS X linker hell

Intro

Friend: I tried looking at static linking in Mac OS X and it seems nearly impossible. Take a look at this http://stackoverflow.com/a/3801032

Me: I have no idea what that -static flag does, but I'm pretty sure that's not how you link to a library. Let me RTFM a bit.

Minutes later...