Skip to content

Instantly share code, notes, and snippets.

View rodionovd's full-sized avatar
🗿
I'm slow

Dmitry Rodionov rodionovd

🗿
I'm slow
View GitHub Profile

Keybase proof

I hereby claim:

  • I am rodionovd on github.
  • I am rodionovd (https://keybase.io/rodionovd) on keybase.
  • I have a public key whose fingerprint is 8BD3 E0B1 1D4C 3D1E D9D2 B766 071C 9F8F DF49 8625

To claim this, I am signing this object:

@rodionovd
rodionovd / shopcurbside-challenge.rb
Last active July 19, 2016 06:58
Curbside's secrets fetcher
#!/usr/bin/ruby
#
# (c) Dmitry Rodionov, 2016
# http://internals.exposed
require 'net/http'
require 'json'
# Sends a GET request to /get-session in order to acquire a new session token.
# Due to the nature of this token -- it's valid for 10 requests only -- we'll
// #!/usr/bin/env swift
// If you want to run this file from the command line uncomment the above line
// so that the '#' symbol is at the beginning of the line.
// Created by Kevin Meaney on 20/11/2014.
// Copyright (c) 2014 Kevin Meaney. All rights reserved.
// The first part of the script is basically config options.
import Cocoa
import AVFoundation
@rodionovd
rodionovd / xcodeargdumper.mm
Last active August 29, 2015 14:04
Xcode plugin snippet for dumping compiler/linker arguments for the given file(s)
#include <objc/runtime.h>
void dump_compiler_and_linker_args_for_file(NSString *file)
{
Class PBXReference = NSClassFromString(@"PBXReference");
if (! PBXReference) return;
id file_ref = [[PBXReference alloc] initWithPath: file];
@rodionovd
rodionovd / mach_exceptions.cpp
Last active October 6, 2023 01:35
Mach exception handling examples by Apple
/*
File: ExceptionTest.c
Contains: Test code for Mach exception handling.
Written by: DTS
Copyright: Copyright (c) 2006 by Apple Computer, Inc., All Rights Reserved.
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
@rodionovd
rodionovd / ssd.c
Last active July 6, 2023 05:15
ssd -- Socket Server demo by Apple
// Copyright (C) 2010 Apple Inc. All Rights Reserved.
#include <launch.h>
#include <libkern/OSAtomic.h>
#include <vproc.h>
#include "shared.h"
static bool g_is_managed = false;
static bool g_accepting_requests = true;
static dispatch_source_t g_timer_source = NULL;