Skip to content

Instantly share code, notes, and snippets.

View MarksCode's full-sized avatar

Ron Marks MarksCode

View GitHub Profile
// ==UserScript==
// @name Teammate Win %
// @author Ephew
// @version 0.1
// @include http://*.koalabeast.com:*
// @include http://tagpro-*.koalabeast.com*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
// ==UserScript==
// @name TagPro Achievements
// @author Capernicus
// @version 2.0.1
// @include http://*.koalabeast.com:*
// @include http://tagpro-*.koalabeast.com*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
let width = self.view.layer.bounds.width
let view = UIView(frame: CGRect(x: 0, y: 0, width: width-100, height: 40))
let titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: width-100, height: 40))
titleLabel.textAlignment = .center
titleLabel.text = "\(petsName)'s Day"
titleLabel.font = UIFont.systemFont(ofSize: 30)
titleLabel.backgroundColor = UIColor.clear
titleLabel.textColor = UIColor.white
titleLabel.adjustsFontSizeToFitWidth = true
titleLabel.minimumScaleFactor = 0.5
# Description: This file holds all my BASH configurations and aliases
#
# Open sublime
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
#
# ---------------------------------------------------------------------------
fileCount () {
if [[ ${#} -ne 1 ]]; then
echo "Usage: fileCount <dirname>"
else
SLIM CHANCE
442 3926 0 717851 0 45 0 0 0 0 45 0
442 3926 0 717849 0 46 0 0 0 0 46 0
442 3926 0 717849 0 44 0 0 0 0 44 0
443 3926 0 717848 0 44 0 0 0 0 44 0
443 3926 0 717848 0 44 0 0 0 0 44 0
443 3926 0 717848 0 46 0 0 0 0 46 0
443 3926 0 717819 0 45 0 0 0 0 45 0
714480 3950 0 5283 195 718235 0 3369 0 0 714480 3950
718892 137 2649 2633 0 719003 0 68 0 43 718892 136
//
// SignInVC.swift
// Dog_Log
//
// Created by Ron Marks on 1/6/17.
// Copyright © 2017 Ron Marks. All rights reserved.
//
import UIKit
import Firebase
## Inspiration
A common everyday occurrence in my house is someone asking something along the lines of, "Did the dog eat her dinner yet?" or "Did someone let the dog out this morning?". Our dog, Joy, has accidentally been fed twice many times by accident because of miscommunication between us, her caretakers. This sort of problem inspired me to develop DogLog, an app that aims to close the communication gap for families with pets.
## What it does
In this app you create a "pack" for your dog where you and any other caretakers of your dog are members. All of you can then log events such as walks, food, or custom events that your dog does. Everyone else in the pack gets a notification so nobody is confused as to whether the dog had their dinner or went outside to go potty. There's also a statistics page so you can see how many walks your dog goes on per week, when the last time they took their medicine was, and gain other insights.
## How I built it
I built this app in my free time over the last school quarter
Under my `"allUsers"` node I'm trying to only allow new data entries to have the following structure:
"allUsers" {
"$user1: {
"name": "user1Name"
"uid": "12345"
}
}
I don't want any other values besides `"name"` and `"uid"`. I added a `"other": { ".validate": false }` rule under each `$user`, but for some reason the following write is denied:
In my iPhone app's home screen I need to check whether the user is logged in or not. In my `viewDidAppear()` I check like this:
override func viewDidAppear(_ animated: Bool) {
if let user = FIRAuth.auth()?.currentUser {
// user is logged in
} else {
// user not logged in, send to home page
self.performSegue(withIdentifier: "NotLoggedInSegue", sender: self)
}
}
I made a huge version of my app's logo thats 15,000px by 15,000px. However when I put it an image view with content mode `aspect fit` the image still appears grainy when running my app on an iPhone. Here's a small part of the screen:
[![img][1]][1]
Does anybody know how to images sharp on iOS?
[1]: https://i.stack.imgur.com/f2o1u.png