CouchDB is a NoSQL database for storing JSON documents. It comes with a REST API out of the box so your client applications can persist data while requiring you to write little or no server-side code. CouchDB's killer feature is its ability to easily replicate, which allows for horizontal scaling, easy backup, and for client adapters to synchronize documents. This is perfect if you want to write an application that is offline-first. It's become my go-to database when creating new
This file contains hidden or 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
#!/bin/sh | |
# Shell script to add docker-ce to Deepin Linux repositories | |
# Remove old docker | |
sudo apt-get remove -y docker docker-engine docker.io containerd runc | |
# Install dependencies | |
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
This file contains hidden or 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
function slugify (str) { | |
var map = { | |
'-' : ' ', | |
'-' : '_', | |
'a' : 'á|à|ã|â|À|Á|Ã|Â', | |
'e' : 'é|è|ê|É|È|Ê', | |
'i' : 'í|ì|î|Í|Ì|Î', | |
'o' : 'ó|ò|ô|õ|Ó|Ò|Ô|Õ', | |
'u' : 'ú|ù|û|ü|Ú|Ù|Û|Ü', | |
'c' : 'ç|Ç', |
This file contains hidden or 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
function generateBaklava(length = 1){ | |
let l = (length * 2) + 1; | |
for(let i = 0; i < l; i++){ | |
let str = ''; | |
for(let j = 0; j < l; j++){ | |
if (i <= l/2) { | |
if(j >= parseInt(l/2, 10) - i && j <= parseInt(l/2, 10) + i ) { | |
str += "*"; | |
} else { |
This file contains hidden or 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
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }
.
- Ensure it’s a file URL e.g.
{ "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] }
- If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
- Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.
This file contains hidden or 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
xpress-app | |
|-- 📁 bin | |
| |-- www | |
|-- 📁 config | |
| |-- config.js | |
| |-- db.js | |
| |-- api.version.js | |
|-- 📁 helpers | |
| |-- 📁 auth | |
| |-- 📁 chat |
This file contains hidden or 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 fs = require('fs'); | |
const path = require('path'); | |
const dirPath = path.join(__dirname, './dir/relative/path'); | |
fs.readdir(dirPath, (err, files) => { | |
let x = 1; | |
files.forEach((file) => { | |
let oldPath = path.join(dirPath,file); | |
let newPath = path.join(dirPath,`filename${x}.extension`); |