db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
{ | |
"emmet.includeLanguages": { | |
"javascript": "javascriptreact" | |
} | |
} |
'use strict'; | |
var express = require("express"); | |
var multer = require('multer'); | |
var app = express(); | |
var options = require('./config/config') | |
var mongoose = require('mongoose'); | |
/* photo manenos */ | |
var cloudinary = require('cloudinary'); |
const logUpdate = require("log-update"); | |
const toX = () => "X"; | |
const delay = seconds => | |
new Promise(resolves => { | |
setTimeout(resolves, seconds * 1000); | |
}); | |
const tasks = [ | |
delay(4), | |
delay(6), |
const { PassThrough, Duplex } = require("stream"); | |
const { createReadStream, createWriteStream } = require("fs"); | |
const readStream = createReadStream("../../powder-day.mp4"); | |
const writeStream = createWriteStream("./copy.mp4"); | |
class Throttle extends Duplex { | |
constructor(ms) { | |
super(); | |
this.delay = ms; |
git branch -m newname |
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="OLD_EMAIL" | |
CORRECT_NAME="Your Correct Name" | |
CORRECT_EMAIL="NEW_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
fn print_all_sub_arrays(arr: Vec<i128>) -> Vec<Vec<i128>> { | |
let mut sub_arrays:Vec<Vec<i128>> = Vec::new(); | |
for i in 0..arr.len() { | |
let mut sum = 0; | |
for j in i..arr.len() { | |
sum += arr[j]; | |
if sum == 0 { | |
sub_arrays.push(arr[i..=j].to_vec()); | |
} |
To fix the "cannot connect to the Docker daemon at unix:///var/run/docker.sock" error on macOS, try exporting the following:
export DOCKER_HOST=unix://$HOME/.docker/run/docker.sock
Alternatively, you can use Docker over TCP. Here's how to configure Docker Desktop to expose the Docker daemon via TCP instead of a Unix socket: