Skip to content

Instantly share code, notes, and snippets.

View mgcm's full-sized avatar

Milton Moura mgcm

  • Ponta Delgada, Portugal
  • X @mgcm
View GitHub Profile
@candlerb
candlerb / go-project-layout.md
Last active April 24, 2024 19:22
Suggestions for go project layout

If someone asked me the question "what layout should I use for my Go code repository?", I'd start by asking back "what are you building: an executable, or a library?"

Single executable

Stage 1: single source file

Create a directory named however you want your final executable to be called (e.g. "mycommand"), change into that directory, and create the following files:

@RenGate
RenGate / InAppPurchaseManager.swift
Last active May 10, 2023 14:42
Sample implementation of In-App purchase manager class
// MIT License
//
// Copyright (c) 2019 Rostyslav Dovhaliuk
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@steipete
steipete / gist:5333a5903e3a50ad14b3
Last active March 21, 2017 11:33
Load Reveal from lldb. Put into ~/.lldbinit, pause app, type reveal. Will only work in Simulator.
command alias reveal_load_sim expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);
command alias reveal_load_dev expr (void*)dlopen((const char *)[(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);
command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];
command alias reveal expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2), (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];