This file contains 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
// Copied from: https://ethfiddle.com/09YbyJRfiI | |
// CryptoKitties Source code | |
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code | |
pragma solidity ^0.4.11; | |
/** | |
* @title Ownable | |
* @dev The Ownable contract has an owner address, and provides basic authorization control |
This file contains 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
const fetch = require('@zeit/fetch-cached-dns')(require('node-fetch')); | |
const {RateLimit} = require(`async-sema`); | |
const lim = new RateLimit(50); | |
module.exports = function getPost(SEGMENT_API_SECRET, s) { | |
return async function post(events) { | |
await lim(); | |
const res = await fetch(`https://api.segment.io/v1/batch`, { | |
method: 'post', | |
body: JSON.stringify({batch: events}), |
This file contains 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
async function sendPayment(franchisors: [string], newFranchisor: string, artist: string, bootlegger: string, price: number) { | |
franchisors.push(bootlegger) | |
franchisors.push(artist) | |
const dividedPrice = price/franchisors.length | |
for (let i = 0; i < franchisors.length; i++) { | |
const franchisor = franchisors[i] | |
This file contains 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
license: mit |
This file contains 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
.factory('$authservice', ['$window', '$localstorage', '$state', function($window, $localstorage, $state) { | |
// Access local storage for existing user info | |
var SHIFT = $localstorage.getObject("Shift") | |
// Does session exist? | |
if (SHIFT && SHIFT.session.token) { | |
console.log("$authservice: Existing Session found: ", [SHIFT]) | |
} else { | |
console.log("$authservice: No session found.") | |
SHIFT = { | |
session: { |
This file contains 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
// Ionic Starter App | |
// angular.module is a global place for creating, registering and retrieving Angular modules | |
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) | |
// the 2nd parameter is an array of 'requires' | |
// 'starter.controllers' is found in controllers.js | |
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'ngCordova']) | |
.run(function($ionicPlatform, $rootScope, $cordovaNetwork, $state, $authservice) { | |
$ionicPlatform.ready(function() { |
This file contains 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
///////////////////////////////////////////////////////////////////////////// | |
///////////////////////////////////////////////////////////////////////////// | |
// Browserify Shims | |
///////////////////////////////////////////////////////////////////////////// | |
///////////////////////////////////////////////////////////////////////////// | |
// var paths = require('./paths'); // Require Your Paths.JS file | |
module.exports = { | |
angular: { |