I hereby claim:
- I am snej on github.
- I am snej (https://keybase.io/snej) on keybase.
- I have a public key ASA32IteNIxEuZRwRwerBGrd-RL2UMiz4nxBpK5Kqu6TjQo
To claim this, I am signing this object:
| #! /usr/bin/env ruby | |
| # | |
| # missing_includes.rb | |
| # By Jens Alfke <jens@couchbase.com> | |
| # Version 2.0 -- 2 Oct 2023 | |
| # Copyright 2021-Present Couchbase, Inc. | |
| # | |
| # This script scans C++ header files looking for usage of common standard library classes, like | |
| # `std::vector`, without including their corresponding headers, like `<vector>`. It similarly looks | |
| # for standard C functions like `strlen` that are used without including their header (`<cstring>`.) |
| // Tails has grown a bit and moved out into its own repository: https://github.com/snej/tails/ | |
| // Please visit it there! | |
| // | |
| // If you want to see the tiny original version from May Forth 2021, it's still here; | |
| // click the "Revisions" button above, or go to: | |
| // https://gist.github.com/snej/9ba59d90689843b22dc5be2730ef0d49/2d55f844b7622aa117b9275bbc9d189613f7ff7f |
| # threadSafeFuture.nim | |
| # Jens Alfke, 30 June 2020 | |
| import asyncdispatch, deques, locks, sugar, threadpool | |
| ## Utilities for mixing async/await with threads. | |
| ## | |
| ## ``threadSafe()`` takes a Future and returns a new Future that can be completed on any thread. | |
| ## The original Future's callback will still be invoked on its original thread, and ``await`` | |
| ## works normally. |
| - (BOOL) startCapture: (NSError**)outError { | |
| if (!_session) { | |
| _session = [[AVCaptureSession alloc] init]; | |
| AVCaptureDevice* video = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeVideo]; | |
| if (!video) | |
| return [self failWithMessage: @"No video camera available" error: outError]; | |
| AVCaptureDeviceInput* input = [AVCaptureDeviceInput deviceInputWithDevice: video | |
| error: outError]; | |
| if (!input) | |
| return [self failWithMessage: @"Couldn't acquire input device" error: outError]; |
| #if TARGET_OS_IPHONE | |
| #import <UIKit/UIKit.h> | |
| typedef UIImage QRImage; | |
| #else | |
| #import <AppKit/AppKit.h> | |
| typedef NSImage QRImage; | |
| #endif | |
| + (QRImage*) QRCodeImageWithData: (NSData*)data size: (CGFloat)size { |
| // | |
| // Async.hh | |
| // | |
| // Copyright © 2018 Couchbase. All rights reserved. | |
| // | |
| #pragma once | |
| #include "RefCounted.hh" | |
| #include <functional> |
I hereby claim:
To claim this, I am signing this object:
| #! /usr/bin/env ruby | |
| # By Jens Alfke. Do What Thou Wilt shall be the whole of the license. | |
| def listBitcode(path, arch, verbose =false) | |
| result = [] | |
| filename = nil | |
| section = nil | |
| output = `otool -l -arch #{arch} "#{path}"` |
| /db: “channels” View | |
| Key Value ID | |
| ["*",1181] ["78k9je3j3k6","1-7b6054260a204912852c3021cab9168c"] 78k9je3j3k6 | |
| ["*",1182] ["kcd0neg7kac","1-ebd3a623c406b28b80d1ebf651ffacec"] kcd0neg7kac | |
| ["*",1183] ["eb33dbinaii","1-4b4a5598313a2f79321f60364b43a990"] eb33dbinaii | |
| ["*",1184] ["f41cig0kk86","1-d44e48481e63331720822afa9fbf3e1f"] f41cig0kk86 | |
| ["*",1185] ["6k5anc2kaii","1-1cec51d3336824eaefc45b3b5fc492f8"] 6k5anc2kaii | |
| ["*",1186] ["j026jml39","1-92f7448c5727533df4e070d06f67386d"] j026jml39 | |
| ["*",1187] ["bnn1ae3b6","1-6dd3cd60eefd7a44184db3368bdcaa7a"] bnn1ae3b6 |
| type CASState struct { | |
| initialized bool // false on the first call to CASNext, then true | |
| Value []byte // Current value of key; update in place to new value | |
| Cas uint64 // Current CAS value of key | |
| Exists bool // Does a value exist for the key? (If not, Value will be nil) | |
| Err error // Error, if any, after CASNext returns false | |
| resp *gomemcached.MCResponse | |
| } | |
| // Non-callback, loop-based version of CAS method. Usage is like this: |