Skip to content

Instantly share code, notes, and snippets.

View loderunner's full-sized avatar
πŸ‘¨β€πŸ’»
πšŒπš˜πšπšŽβ€‚πš•πš’πšπšŽ

Charles Francoise loderunner

πŸ‘¨β€πŸ’»
πšŒπš˜πšπšŽβ€‚πš•πš’πšπšŽ
View GitHub Profile
@loderunner
loderunner / git-completion.sh
Created January 17, 2019 13:22
Install bash completions on macOS
ln -s /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash /usr/local/etc/bash_completion.d/git
@loderunner
loderunner / activate_goenv.sh
Last active May 18, 2017 20:01
Set environment variables for Go development to a given workspace.
# Set environment for Go development. Inspired by Python virtualenv
# This file must be used with "source activate_goenv.sh" *from bash*
# you cannot run it directly
deactivate () {
# reset old environment variables
# ! [ -z ${VAR+_} ] returns true if VAR is declared at all
if ! [ -z "${_OLD_GOENV_GOPATH+_}" ] ; then
GOPATH="$_OLD_GOENV_GOPATH"

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]