This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aspiration App Logic | |
open app from home screen -> Has User Previously Logged In? | |
Logged Out Flow | |
Has User Previously Logged In? | |
yes -> Is Device Authentication Set Up? | |
no -> App Welcome Screen | |
App Welcome Screen | |
tap login -> Is Device Authentication Set Up? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after. | |
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents | |
# Agents to disable | |
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
# user system total real | |
# 2.150000 0.200000 2.350000 ( 2.397291) | |
# 2.830000 0.160000 2.990000 ( 3.060009) | |
# user system total real | |
# 2.130000 0.160000 2.290000 ( 2.324952) | |
# 2.810000 0.170000 2.980000 ( 3.022856) | |
#1000 | |
#1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You don't actually need this. | |
# I wrote this, but rails support this | |
# Use store_accessor :data, :admin | |
module JsonAccessor | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def json_accessor(json_attribute, *fields) | |
send(:store, json_attribute, accessors: fields) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 user nginx; | |
3 worker_processes 4; | |
2 pid /var/run/nginx.pid; | |
1 worker_rlimit_nofile 1024; | |
6 events { | |
1 worker_connections 512; | |
2 } | |
3 http { | |
4 | |
5 include /etc/nginx/mime.types; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flash_success(message = nil, opts = {}) | |
if message | |
flash[:success] = message | |
else | |
flash[:success] = translate '.flash.success_html'.freeze, view_assigns.symbolize_keys.merge(opts).merge(default: :"flash.default.success") | |
end | |
end | |
def flash_error(message = nil, opts = {}) | |
if message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Accessable | |
module ::InheritedResources::BaseHelpers | |
def end_of_association_chain | |
chain = association_chain.last | |
if association_chain.is_a?(ActiveRecord::Relation) | |
apply_scopes_if_available(association_chain) | |
elsif chain | |
if method_for_association_chain | |
apply_scopes_if_available(chain.send(method_for_association_chain)) | |
else |
NewerOlder