Here's this example as a GET request: https://api.saasify.sh/1/call/transitive-bullshit/text-to-ascii-art@09087438/?input=https://octodex.github.com/images/original.png&ops[0][op]=jpeg
.
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 crypto = require('crypto') | |
const hash = (d) => { | |
const buffer = Buffer.isBuffer(d) ? d : Buffer.from(d.toString()) | |
return crypto.createHash('sha256').update(buffer).digest('hex') | |
} |
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 hasha = require('hasha') | |
const hash = (input) => hasha(input, { algorithm: 'sha256' }) |
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 pick = require('lodash.pick') | |
const stableStringify = require('fast-json-stable-stringify') | |
const data = pick(myData, ['keyFoo', 'keyBar']) | |
const fingerprint = hash(stableStringify(data)) |
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
<style> | |
.gist { | |
width: 100%; | |
max-width: 680px; | |
} | |
.gist-file { | |
margin-bottom: 0 !important; | |
} | |
.gist + figcaption { | |
margin-top: 1em; |
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 isProd = (process.env.NODE_ENV === 'production') | |
/** | |
* Small utility for storing both live and test stripe IDs in a mongoose schema, | |
* but only publicly surfacing the active ID depending on the current | |
* environment. | |
*/ | |
module.exports = (id, type = String, opts = { }) => { | |
const testId = `_${id}Test` | |
const liveId = `_${id}Live` |
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
stages: | |
- E2E | |
.ios_base: | |
tags: | |
- macOS | |
- swiftlint | |
cache: | |
paths: | |
- node_modules |
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
[ | |
{ | |
"url": "https://github.com/jlevy/the-art-of-command-line", | |
"userName": "jlevy", | |
"repoName": "the-art-of-command-line", | |
"desc": "Master the command line, in one page", | |
"numCommits": 1184, | |
"numIssues": 72, | |
"numPRs": 47, | |
"numProjects": 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
#!/usr/bin/env node | |
'use strict' | |
const pMap = require('p-map') | |
const cheerio = require('cheerio') | |
const got = require('got') | |
const { resolve } = require('url') | |
const baseUrl = 'https://github.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
const pMap = require('p-map') | |
// ... | |
return (await pMap(repos, processDetailPage, { | |
concurrency: 3 | |
})).filter(Boolean) |