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
package com.ctrloptcmd.string { | |
/** | |
* Konami.as | |
* Up Up Down Down Left Right Left Right B A | |
* | |
* @langversion: ActionScript 3.0 | |
* @playerversion: Flash 9.0 | |
* |
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
package com.ctrloptcmd.string { | |
/** | |
* Keys.as | |
* | |
* @langversion: ActionScript 3.0 | |
* @playerversion: Flash 9.0 | |
* | |
* @author: Martin Jacobsen | |
* @site : http://ctrloptcmd.com |
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
wget http://wordpress.org/latest.zip && unzip latest.zip ; mv wordpress/* ../* ; rm -rf wordpress ; rm latest.zip ; exit |
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
package com.ctrloptcmd.utils { | |
/** | |
* XTrace.as | |
* | |
* @langversion : ActionScript 3.0 | |
* @playerversion : Flash 9.0 | |
* | |
* @author : Martin Jacobsen | |
* @since : 24-03-2009 |
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
package com.ctrloptcmd.string { | |
/** | |
* Copyright 2009 Martin Jacobsen. | |
* | |
* @langversion ActionScript 3.0 | |
* @playerversion Flash 10.0 | |
* | |
* @author Martin Jacobsen | |
* @since 2009-02-02 |
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
export function getShape(object, depth = 1) { | |
const tab = ' '; | |
const prefix = tab; | |
let output = '{\n'; | |
Object.keys(object).forEach((key) => { | |
const type = typeof (object[key]); | |
let desc = ''; | |
if (type === 'function') { | |
desc = 'func'; |
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
export function isDateInRange(checkPointIn, startPointIn, endPointIn) { | |
if ([checkPointIn, startPointIn, endPointIn].some((point) => point === undefined)) { | |
console.warn('Function expects three parameters; checkPoint: Date, startPoint: Date, endPoint: Date'); | |
return; | |
} | |
const checkPoint = new Date(checkPointIn).getTime(); | |
const startPoint = new Date(startPointIn).getTime(); | |
const endPoint = new Date(endPointIn).getTime(); | |
return checkPoint > startPoint && checkPoint < endPoint; |
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
export function getBaseType(input) { | |
return ({}).toString.call(input).match(/\s([a-zA-Z]+)/)[1]; | |
} | |
export function getType(input, restricted = false) { | |
let output = getBaseType(input); | |
if (restricted) return output; | |
if (output.toLowerCase() === 'object') output = input.type ? input.type.name : input.constructor.name; | |
return output; | |
} |
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
/** | |
* Cloud function triggered by changes in dataset which will generate metadata for art asset. | |
*/ | |
const Promise = require('es6-promise').Promise; | |
const sanityClient = require('@sanity/client'); | |
/** Setup */ | |
const client = token => sanityClient({ | |
projectId: '<projectId>', |
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
/** | |
* This sets up a very lightweight App State based on React Context API | |
* with a familiar reducer / actions / dispatcher syntax, and also exposes | |
* this to Redux Devtools which is good and not bad. | |
* More info here: https://medium.com/simply/state-management-with-react-hooks-and-context-api-at-10-lines-of-code-baf6be8302c | |
* ...and here: https://github.com/troch/reinspect | |
*/ | |
import React, { createContext, useContext } from 'react'; | |
import { useReducer } from 'reinspect'; | |
import PropTypes from 'prop-types'; |
OlderNewer