Many of the more "advanced" typescript features can be used for creating "value-derived" types.
At its simplest form:
let vehicle = { name: "Van", wheels: 4 }
(function () { | |
WebSocket.prototype._send = WebSocket.prototype.send; | |
WebSocket.prototype.send = function (data) { | |
this._send(data); | |
this.addEventListener('message', function (msg) { | |
console.log('>> ' + msg.data); | |
}, false); | |
this.send = function (data) { | |
this._send(data); | |
console.log("<< " + data); |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright (C) 2015 The Android Open Source Project | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
var T = require("twit"); | |
var Q = require("q"); | |
// key and secret for Twitter for iPhone. | |
// A whitelisted app is needed to access the cards API; you can't just create your own currently. | |
var TWITTER_CONSUMER_KEY = "IQKbtAYlXLripLGPWd0HUA"; | |
var TWITTER_CONSUMER_SECRET = "GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU"; | |
// These you will have to fill in yourself by authorizing Twitter for iPhone for your account. | |
// How to get the access tokens through OOB authorization is outside the scope of this snippet. | |
var TWITTER_ACCESS_TOKEN = ""; |
/* pages/creator-dashboard.js */ | |
import { ethers } from 'ethers' | |
import { useEffect, useState } from 'react' | |
import axios from 'axios' | |
import Web3Modal from "web3modal" | |
import { | |
nftmarketaddress, nftaddress | |
} from '../config' |
import Redis, { KeyType, Ok } from 'ioredis'; | |
const redis = new Redis(process.env.REDIS_HOST); | |
export const set = async ( | |
key: KeyType, | |
seconds: number, | |
value: Record<string, unknown>, | |
): Promise<Ok> => | |
// https://redis.io/commands/psetex |
Run each of the following lines, replacing yourdomain.com
and codehere
with your details:
now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
//------------------------------------------------ | |
// Report on Budget vs Spend (Hybrid) | |
// Created by: Remko van der Zwaag & PDDS | |
// remkovanderzwaag.nl & pdds.nl | |
// More info: http://goo.gl/d0KVTd | |
// CHANGELOG | |
// 12-06-2014: Combined two separate scripts into one Hybrid version (for MCC and accounts) | |
// 12-02-2015: Added column Spend yesterday and empty columns with days | |
// 18-06-2015: Added logic to only check campaigns with a specific label | |
// 03-02-2016: Will check for labelled adgroups in ignored campaigns |
# Most part of this file is created by https://www.gitignore.io | |
### Node ### | |
# Logs | |
logs | |
*.log | |
# Runtime data | |
pids | |
*.pid |