Skip to content

Instantly share code, notes, and snippets.

View dacioromero's full-sized avatar

Dacio dacioromero

View GitHub Profile
@dacioromero
dacioromero / AdvancedWindowSnap-Dacio.ahk
Last active October 30, 2020 05:21 — forked from AWMooreCO/AdvancedWindowSnap.ahk
Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys.
/**
* Advanced Window Snap
* Snaps the Active Window to one of nine different window positions.
*
* @author Andrew Moore <andrew+github@awmoore.com>, Dacio Romero <DacioRomero@gmail.com>
* @version 1.01
*/
/**
* SnapActiveWindow resizes and moves (snaps) the active window to a given position.
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>>
@dacioromero
dacioromero / in-memory-storage.ts
Last active February 13, 2024 02:29
TypeScript Storage Implementation
class InMemoryStorage implements Storage {
private data = new Map<string, string>()
clear (): void {
this.data.clear()
}
getItem (key: string): string | null {
return this.data.get(String(key)) ?? null
}
{
// 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",