Skip to content

Instantly share code, notes, and snippets.

View iwasrobbed's full-sized avatar
:shipit:
"1 billion years".Save()

rob phillips iwasrobbed

:shipit:
"1 billion years".Save()
View GitHub Profile
-- modified from https://github.com/viascom/nanoid-postgres
/*
* Copyright 2023 Viascom Ltd liab. Co
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the

Consciousness and its Place in Nature

David J. Chalmers

1 Introduction^1

Consciousness fits uneasily into our conception of the natural world. On the most common con- ception of nature, the natural world is the physical world. But on the most common conception of consciousness, it is not easy to see how it could be part of the physical world. So it seems that to find a place for consciousness within the natural order, we must either revise our conception of

final class CurrencySymbol {
static let shared = CurrencySymbol()
/// Finds the shortest currency symbol possible and formats the amount with it
/// Note: this works around using `currencyCode` and how it displays `CA$1234.56` instead of `$1234.56`
func currencyString(for amount: Decimal, isoCurrencyCode: String?) -> String {
guard let isoCurrencyCode = isoCurrencyCode,
let currencySymbol = findSymbol(for: isoCurrencyCode)
else { return String(describing: amount) }
return formatter(for: currencySymbol).string(for: amount) ?? String(describing: amount)
@iwasrobbed
iwasrobbed / me360.md
Created July 29, 2019 14:08
Me360 looking for first hire, full stack engineer

Me360 is a start up focused on delivering effective employee training at scale for high impact professional skills. I (founder) have been collaborating with a great engineer friend and former colleague to develop the initial versions of the product, and now with some market traction it's time to formalize a small core team.

I'm looking to hire the first full-time fullstack engineer for the company who would own all the technical work and direction for the next year. We'd work very closely together (I have a product and start up background), alongside a contract designer. After year one, they'd likely build out their team.

This company has ambitions to be a high growth tech company and deliver a meaningful solution to help professionals advance their careers with really powerful skills. It's a great opportunity for someone who's interested in this mission, who enjoys start up life and quick release cycles, and who's a dynamic problem solver at introducing relevant technologies to

@iwasrobbed
iwasrobbed / SwipeNavigationController.swift
Created April 16, 2017 05:12
Re-enables the interactivePopGestureRecognizer functionality that we lose when we implement our own back button handling.
/*
This class re-enables the interactivePopGestureRecognizer
functionality that we lose when we implement our own back button handling.
It disables the pop gesture in three scenarios:
1) when the user is still on the root view controller
2) when a push animation is in progress
3) when the user swipes quickly multiple times and animations don't have time to be performed
*/
@iwasrobbed
iwasrobbed / example_hud.swift
Last active November 25, 2019 07:27
Example of how to create a HUD in Swift 3
//
// HUD.swift
//
// Created for a coding challenge called FoodDictator
//
// This example relies on SwiftyGif to show an animated GIF for progress,
// but you could just as easily replace it with something like RPCircularProgress.
//
// Links for both are below:
// SwiftyGif: https://github.com/kirualex/SwiftyGif
@iwasrobbed
iwasrobbed / 0_reuse_code.js
Created June 16, 2016 19:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x3a0b1214 bool objc::DenseMapBase<objc::DenseMap<objc_object*, unsigned long, true, objc::DenseMapInfo<objc_object*> >, objc_object*, unsigned long, objc::DenseMapInfo<objc_object*>, true>::LookupBucketFor<objc_object*>(objc_object* const&, std::__1::pair<objc_object*, unsigned long> const*&) const + 3
1 libobjc.A.dylib 0x3a0b1013 objc::DenseMapBase<objc::DenseMap<objc_object*, unsigned long, true, objc::DenseMapInfo<objc_object*> >, objc_object*, unsigned long, objc::DenseMapInfo<objc_object*>, true>::find(objc_object* const&) + 22
2 libobjc.A.dylib 0x3a0b1013 objc::DenseMapBase<objc::DenseMap<objc_object*, unsigned long, true, objc::DenseMapInfo<objc_object*> >, objc_object*, unsigned long, objc::DenseMapInfo<objc_object*>, true>::find(objc_object* const&) + 22
3 libobjc.A.dylib 0x3a0afaf3 objc_object::sidetable_release(bool) + 54
4 Everest 0x001e319d -[JDSt
@iwasrobbed
iwasrobbed / TwitterReverseAuth
Last active August 29, 2015 13:57
Example of how to use AFOAuth1Client to do reverse auth of an ACAccount
//
// EvstReverseAuthExample.m
// Everest
//
// Created by Rob Phillips on 3/14/14.
//
#import <Accounts/Accounts.h>
#import "EvstReverseAuthExample.h"
#import "AFOAuth1Client.h"
@iwasrobbed
iwasrobbed / gist:5528897
Last active June 5, 2020 20:34
UICollectionView w/ NSFetchedResultsController & NSBlockOperation. Idea originated from Blake Watters (https://github.com/AshFurrow/UICollectionView-NSFetchedResultsController/issues/13)
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller
{
self.shouldReloadCollectionView = NO;
self.blockOperation = [[NSBlockOperation alloc] init];
}
- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id<NSFetchedResultsSectionInfo>)sectionInfo
atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type
{
__weak UICollectionView *collectionView = self.collectionView;