Skip to content

Instantly share code, notes, and snippets.

View colinwarn's full-sized avatar
🎯
Focusing

Colin Warn colinwarn

🎯
Focusing
View GitHub Profile
//
// NewEventToCreateVC.swift
// WSUStudentEvents
//
// Created by Colin Warn on 7/31/17.
// Copyright © 2017 Colin Warn. All rights reserved.
//
import UIKit
import FirebaseDatabase
//
// ViewController.swift
// WSUStudentEvents
//
// Created by Colin Warn on 7/15/17.
// Copyright © 2017 Colin Warn. All rights reserved.
//
import UIKit
import Firebase
from flask import Flask
from flask_ask import Ask, statement, question, session
import json
import requests
import time
import unidecode
import subprocess
import os
from multiprocessing import Process
import synchronized_lights
p = Process(target=synchronized_lights.main)
onp = Process(target=alexalightson.run)
buttonPin = 29
GPIO.setup(buttonPin, GPIO.IN, pull_up_down = GPIO.PUD_UP)
isPartyModeOn = False
def errorChecking():
print(onp.is_alive())
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
print("add payment")
for transaction: AnyObject in transactions {
let trans = transaction as! SKPaymentTransaction
print(trans.transactionState.rawValue)
switch trans.transactionState {
case .purchased:
print("buy ok, unlock IAP")
from flask import Flask
from flask_ask import Ask, statement, question, session
import json
import requests
import time
import unidecode
import subprocess
import os
import synchronized_lights
#!/usr/bin/env python
#
# Licensed under the BSD license. See full license in LICENSE file.
# http://www.lightshowpi.com/
#
# Author: Todd Giles (todd@lightshowpi.com)
# Author: Chris Usey (chris.usey@gmail.com)
# Author: Ryan Jennings
# Author: Paul Dunn (dunnsept@gmail.com)
# Author: Tom Enos (tomslick.ca@gmail.com)
struct EventData {
var eventTitle: String
var eventDateStartTime: Date
var eventDateEndTime: Date
var eventDescription: String
var eventType: EventType
var eventLocation: String?
var isPublic: Bool
var password: String?
var image: UIImage?
class ViewController: UIViewController, UITextFieldDelegate, GADBannerViewDelegate, SKStoreProductViewControllerDelegate {
let storeViewController = SKStoreProductViewController()
override func viewDidLoad() {
super.viewDidLoad()
storeViewController.delegate = self
@IBAction func removeAds(_ sender: Any) {
let storeViewController = SKStoreProductViewController()
storeViewController.delegate = self
print("pushed")
let parameters = [SKStoreProductParameterITunesItemIdentifier: NSNumber(value: 676059878)]
// 1237690288
storeViewController.loadProduct(withParameters: parameters, completionBlock:
{result, error in