PostgreSQL Type | PostgreSQL Size | Description | Range | Diesel Type | Rust Type |
---|---|---|---|---|---|
Nullable Types | nullable | Nullable `` |
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
// TO-DO Tree Extension | |
"todo-tree.expanded": true, | |
"todo-tree.tags": [ | |
"TODO", | |
"FIXME", | |
"OPTIMIZE", | |
"STOPSHIP" | |
], | |
"todo-tree.customHighlight": { | |
"TODO": { |
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
'use strict' | |
const flatCache = require('flat-cache') | |
module.exports = class Cache { | |
constructor (name, path, cacheTime = 0) { | |
this.name = name | |
this.path = path | |
this.cache = flatCache.load(name, path) | |
this.expire = cacheTime === 0 ? false : cacheTime * 1000 * 60 |
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
from itertools import islice | |
import firebase_admin | |
from firebase_admin import credentials | |
from firebase_admin import db | |
from firebase_admin import firestore | |
def _split(data, size=500): | |
"""Splits a dictionary into a sequence of smaller dictionaries.""" |
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
import BooksPage from './pages/BooksPage.js'; | |
new Vue({ | |
el: '#app', | |
data: { | |
page: BooksPage | |
}, | |
methods: { | |
navigate(event) { | |
this.page = () => import(`./${event.target.pathname}`) | |
// Vue.js < 2.5.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
# Bash Fidget Spinner | |
# Could also be included in a bashrc file | |
fidget() { | |
start_time="0.02"; | |
spin_efficiency="0.99"; | |
end_time="3"; | |
time="$start_time"; | |
printf "\e[92mPress any key to give another spin...\n\n"; |
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
/** | |
* Returns SHA-256 hash from supplied message. | |
* | |
* @param {String} message. | |
* @returns {String} hash as hex string. | |
* | |
* @example | |
* sha256('abc').then(hash => console.log(hash)); | |
* const hash = await sha256('abc'); | |
*/ |
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/python3 | |
""" Demonstration of logging feature for a Flask App. """ | |
from logging.handlers import RotatingFileHandler | |
from flask import Flask, request, jsonify | |
from time import strftime | |
__author__ = "@ivanleoncz" | |
import logging |
NewerOlder