Skip to content

Instantly share code, notes, and snippets.

💻
Working on Coil

Dacio dacioromero

💻
Working on Coil
View GitHub Profile
@dacioromero
dacioromero / crontab
Last active May 22, 2020
Update qBittorrent trackers from https://github.com/ngosang/trackerslist daily
View crontab
@daily /usr/local/bin/python3 /root/update-trackers.py
View docker-compose.yml
version: "3"
services:
vpn:
image: "dperson/openvpn-client"
network_mode: "bridge"
cap_add:
- "NET_ADMIN"
devices:
- "/dev/net/tun"
environment:
View remove-transitive.js
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}`)
View eslint.json5
{
// 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",
@dacioromero
dacioromero / in-memory-storage.ts
Last active Jan 29, 2020
TypeScript Storage Implementation
View in-memory-storage.ts
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
}
View Wills Places
https://www.zillow.com/homedetails/Crofton-Way-South-San-Francisco-CA-94080/2119317023_zpid/?
https://www.zillow.com/homedetails/1826-Poggi-St-453-113-Alameda-CA-94501/2086304165_zpid/?
https://www.apartments.com/3-br-2-bath-house-696-athol-avenue-301-oakland-ca/nrv78tn/
View PickOmitByValue.ts
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>>
View reddit_post_dry.json
{
"$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": {
View reddit_post_comments.json
{
"$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
You can’t perform that action at this time.