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
// | |
// APIError.swift | |
// Backflip | |
// | |
// Created by Patrick Wilson on 11/16/21. | |
// | |
import Foundation | |
public enum APIError { |
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
"""Segment.io analytics library interface.""" | |
from uuid import uuid4 | |
import analytics | |
from django.conf import settings | |
analytics.write_key = settings.SEGMENT_API_KEY | |
def identify_user_persona(user): | |
"""Execute segment identify action for user.""" |
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
"""Segment.io analytics library interface.""" | |
from uuid import uuid4 | |
import analytics | |
from django.conf import settings | |
analytics.write_key = settings.SEGMENT_API_KEY | |
def identify_user_persona(user): | |
"""Execute segment identify action for user.""" |
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
pragma solidity ^0.4.23; | |
contract Ownable { | |
address public owner; | |
event OwnershipRenounced(address indexed previousOwner); | |
event OwnershipTransferred( | |
address indexed previousOwner, |
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
pragma solidity ^0.4.24; | |
import "./Ownable.sol"; | |
contract ShitCoinShowdown is Ownable { | |
event ContractUpgrade(address newContract); | |
address public newContractAddress; |
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
/* | |
Purpose: | |
Convert (or Serialize) an object to a JSON String or Dictionary. | |
Usage: | |
Use 'Serialize.toJSON' on instances of classes that: | |
- Inherit from NSObject | |
- Implement 'Serializable' protocol | |
- Implement the property 'jsonProperties' and return an array of strings with names of all the properties to be serialized |
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
import uuid | |
from django.db import models | |
from django_extensions.db.fields.json import JSONField | |
from djorm_pgarray.fields import TextArrayField | |
from django.contrib.auth.models import User | |
# you could make a monkuser class and use the standard user model to only handle auth | |
# https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model |
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 status_code_behavior(r): | |
""" | |
Holds a dictionary of all possible HTTP status codes and returns a string value. | |
:param code: HTTP Response status code | |
:return: {String} | |
""" | |
# Copied from multiple sources... | |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Response_codes | |
# http://httpstatus.es/ |
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
// Useful Macros. | |
// The best place to import this is in your project's pch file. | |
// See http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ for details. | |
// Most current version at https://gist.github.com/325926 along with usage notes. | |
#ifndef jcscommonmacros | |
#define jcscommonmacros_1_0 10000 | |
#define jcscommonmacros jcscommonmacros_1_0 | |
#endif |
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
/* | |
* -------------------------------------------------------- | |
* | |
* Global Audio Player | |
* Base class | |
* | |
* -------------------------------------------------------- | |
*/ |
NewerOlder