Skip to content

Instantly share code, notes, and snippets.

View arkilis's full-sized avatar
🎯
Focusing

Ben arkilis

🎯
Focusing
View GitHub Profile
#!/bin/bash
set -e
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).swift$' | while read line; do
swiftformat "${line}";
git add "$line";
done
swiftlint --quiet --strict
#if os(OSX)
// compiles for OS X
#elseif os(iOS)
// compiles for iOS
#elseif os(tvOS)
// compiles for TV OS
#elseif os(watchOS)
// compiles for Apple watch
#endif
var url = ""
#if DEBUG
// use localhost while under debug mode
url = "https://localhost"
#else
// use production url while under release
url = "production url"
#endif
// You can negate the flag
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FBSManager : MonoBehaviour
{
public int rangeInt;
public float updateInterval = 0.5F;
private float accum = 0;
private int frames = 0;
struct NoteModel: Codable{
let userName: String
let latitude: Double
let longitude: Double
let text: String
let createDateTime: String
// mapping the keys from data
enum CodingKeys: String, CodingKey {
case userName = "username"
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class InterstitialAdManager : MonoBehaviour {
#if UNITY_IOS
private string gameId = "3685328";
#elif UNITY_ANDROID
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class BannerAdManager : MonoBehaviour {
#if UNITY_IOS
private string gameId = "1234567";
#elif UNITY_ANDROID
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
using UnityEngine.UI;
public class RewardedVideoButton : MonoBehaviour, IUnityAdsListener {
#if UNITY_IOS
private string gameId = "3685328";
let note1 = NoteModel(userName: "testing user 2", latitude: 0.0, longitude: 0.0, text: "testing notes", createDateTime: "04/12/2020 18:12:03")
let note2 = NoteModel(userName: "testing user 2", latitude: 0.0, longitude: 0.0, text: "testing notes", createDateTime: "04/12/2020 18:12:03")
let array = [note1]
XCTAssertEqual(array.contains(note2), true) // true
class NoteModel: NSObject {
let userName: String
let latitude: Double
let longitude: Double
let text: String
let createDateTime: String
init(userName: String, latitude: Double, longitude: Double, text: String, createDateTime: String) {
self.userName = userName