Skip to content

Instantly share code, notes, and snippets.

View dacioromero's full-sized avatar

Dacio dacioromero

View GitHub Profile
router.get('/test', (req, res) => {
const appids = req.query.appids.split(',')
const urls = appids.map(id =>`https://store.steampowered.com/app/${id}`);
igbd.games({
fields: ['name', 'cover'],
filters: {
'websites.url-in': urls
}
})
@dacioromero
dacioromero / user_basic.json
Last active March 8, 2019 13:54
Basic User JSON Schema for for https://medium.com/p/71e0ebb840ae
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "User",
"description": "A user in the database",
"type": "object",
"properties": {
"email": {
"description": "Their email"
},
"username": {
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "User",
"description": "A user in the database",
"type": "object",
"properties": {
"email": {
"description": "Their email",
"type": "string",
"format": "email"
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Post",
"description": "A Reddit post and its comments",
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 8,
"maxLength": 32
@dacioromero
dacioromero / reddit_post_comments.json
Last active March 8, 2019 14:42
Reddit Post w/ Comments JSON Schema for https://medium.com/p/71e0ebb840ae
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Post",
"description": "A Reddit post and its comments",
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 8,
"maxLength": 32
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Post",
"description": "A Reddit post and its comments",
"type": "object",
"definitions": {
"votes": {
"type": "object",
"properties": {
"up": {
type KeysMatchingValue<T, V> = { [P in keyof T]: T[P] extends V ? P : never }[keyof T]
type PickByValue<T, V> = Pick<T, KeysMatchingValue<T, V>>
type OmitByValue<T, V> = Omit<T, KeysMatchingValue<T, V>>
{
// Possible Errors
"for-direction": "off",
"getter-return": "off",
"no-async-promise-executor": "off",
"no-await-in-loop": "off",
"no-compare-neg-zero": "off",
"no-cond-assign": "off",
"no-console": "off",
"no-constant-condition": "off",
const fs = require('fs')
const lockfile = require('@yarnpkg/lockfile')
const package = require('./package.json')
const lock = lockfile.parse(fs.readFileSync('yarn.lock', 'utf-8')).object
const allDeps = new Set()
const parseDep = ([name, version]) => {
allDeps.add(`${name}@${version}`)
version: "3"
services:
vpn:
image: "dperson/openvpn-client"
network_mode: "bridge"
cap_add:
- "NET_ADMIN"
devices:
- "/dev/net/tun"
environment: