Skip to content

Instantly share code, notes, and snippets.

Avatar
💳

Aleksander Balicki alistra

💳
View GitHub Profile
View CompilerCrash.swift
extension Result: RandomAccessCollection, BidirectionalCollection, Collection, Sequence where Success: RandomAccessCollection, Success.Index == Int {
public typealias Element = Result<Success.Element, Failure>
public typealias Index = Int
public var startIndex: Int {
switch self {
case .success(let array):
return array.startIndex
case .failure:
return 0
}
@alistra
alistra / log.txt
Created Nov 14, 2017
Simultaneous accesses to 0x7b2000022890, but modification requires exclusive access.
View log.txt
Simultaneous accesses to 0x7b2000022890, but modification requires exclusive access.
Previous access (a modification) started at ReactiveKit`closure #1 in AtomicObserver.init(disposable:observer:) + 722 (0x109af4492).
Current access (a read) started at:
0 libswiftCore.dylib 0x000000010f3def10 swift_beginAccess + 505
1 ReactiveKit 0x0000000109af48b0 AtomicObserver.on(_:) + 489
2 ReactiveKit 0x0000000109b54cd0 closure #1 in closure #1 in SignalProtocol.start(with:) + 689
3 ReactiveKit 0x0000000109b796f0 partial apply for closure #1 in closure #1 in SignalProtocol.start(with:) + 100
4 ReactiveKit 0x0000000109b81f50 thunk for @callee_owned (@in Event<A, B>) -> () + 72
5 ReactiveKit 0x0000000109b8bf20 partial apply for thunk for @callee_owned (@in Event<A, B>) -> () + 136
View -
-----BEGIN RSA PRIVATE KEY-----
MIIcmwIBAAKCBlMbyooEaYo7HtWo0JDfLNecywEYT5V4yhgFx9a58af8LAYmwRMe
nlO1ukxf+y7VDaqRpemS+96LC0a2Qz+LDbOhfc8OsWw8HYrYVQXhlVUgoECOcxVu
RMGsghtnit2xNLjF24spTYz6BCcv7qdHiVue0JVgVnS+BztvYTGJBw1fjsVHf0TC
xGXZcELjfOtvHcYgUndFm/4QsJjwxYMRamArGIX5jQ73cqlOmoZWKE1twLctfXp8
+8ic/SPFnCe1+PLKpm+9SaE8NQJqAwCrF7Tmev1BPunwv+wNkKArU3xtpou/Rcsi
OUOHAgeBb8LoS2ulEav1LtXrfjqHICRTDJF6i0MsrknUBpJjCwbR2D+mpC6iT2Ap
1F6H9vxnfmOOS6OfEmQHmtU97nycAFZ6dFcSAzFHDiXqB7FPosoFQs8lcncBNhGe
1yCN1Z3DZclwQmFoTXX3/Fl11jvS4pFqIXctvPJPl+7ZtzNnnE8Xz3in6j8PYeVc
lkZvyRTN0Ty6GYIQRFkTCLeM3hKGJ1HqTB9u/S/7SKfPJE8uMZpVOoQtVRaHIS/7
View -
-----BEGIN RSA PRIVATE KEY-----
MIIcmwIBAAKCBlMbyooEaYo7HtWo0JDfLNecywEYT5V4yhgFx9a58af8LAYmwRMe
nlO1ukxf+y7VDaqRpemS+96LC0a2Qz+LDbOhfc8OsWw8HYrYVQXhlVUgoECOcxVu
RMGsghtnit2xNLjF24spTYz6BCcv7qdHiVue0JVgVnS+BztvYTGJBw1fjsVHf0TC
xGXZcELjfOtvHcYgUndFm/4QsJjwxYMRamArGIX5jQ73cqlOmoZWKE1twLctfXp8
+8ic/SPFnCe1+PLKpm+9SaE8NQJqAwCrF7Tmev1BPunwv+wNkKArU3xtpou/Rcsi
OUOHAgeBb8LoS2ulEav1LtXrfjqHICRTDJF6i0MsrknUBpJjCwbR2D+mpC6iT2Ap
1F6H9vxnfmOOS6OfEmQHmtU97nycAFZ6dFcSAzFHDiXqB7FPosoFQs8lcncBNhGe
1yCN1Z3DZclwQmFoTXX3/Fl11jvS4pFqIXctvPJPl+7ZtzNnnE8Xz3in6j8PYeVc
lkZvyRTN0Ty6GYIQRFkTCLeM3hKGJ1HqTB9u/S/7SKfPJE8uMZpVOoQtVRaHIS/7
View -
; <<>> DiG 9.8.3-P1 <<>> jasminek.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60428
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;jasminek.net. IN A
;; ANSWER SECTION:
View keybase.md

Keybase proof

I hereby claim:

  • I am alistra on github.
  • I am alistra (https://keybase.io/alistra) on keybase.
  • I have a public key whose fingerprint is 3B0D 716D 7636 80BC 72E2 A522 E3D2 CAD6 A16E DE5B

To claim this, I am signing this object:

@alistra
alistra / gist:c6c16e4b26736d318766
Created Jun 13, 2015
pip install python-dateutil on OS X 10.11
View gist:c6c16e4b26736d318766
pip python-dateutil
The directory '/Users/alistra/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/alistra/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting python-dateutil
Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB
@alistra
alistra / gist:fbcaac8f2472a87de229
Created Jun 13, 2015
pip install pytz on OS X 10.11
View gist:fbcaac8f2472a87de229
pip pytz
The directory '/Users/alistra/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/alistra/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting pytz
Downloading pytz-2015.4-py2.py3-none-any.whl (475kB)
100% |████████████████████
View gist:5668955
#include <emscripten/bind.h>
using namespace emscripten;
using namespace std;
struct Ssss {
char *c;
int x;
};
View CGRectIntegralScaled.m
CGRect CGRectIntegralScaledEx(CGRect rect, CGFloat scale)
{
return CGRectMake(floorf(rect.origin.x * scale) / scale, floorf(rect.origin.y * scale) / scale, ceilf(rect.size.width * scale) / scale, ceilf(rect.size.height * scale) / scale);
}
CGRect CGRectIntegralScaled(CGRect rect)
{
return CGRectIntegralScaledEx(rect, [[UIScreen mainScreen] scale]);
}