Follow this: https://gist.github.com/evgenyneu/5c5c37ca68886bf1bea38026f60603b6
And this (to avoid breaking Ubuntu): https://github.com/AppImage/AppImageKit/wiki/FUSE
Follow this: https://gist.github.com/evgenyneu/5c5c37ca68886bf1bea38026f60603b6
And this (to avoid breaking Ubuntu): https://github.com/AppImage/AppImageKit/wiki/FUSE
| #!/bin/sh | |
| STAGED_FILES=$(git diff-index HEAD --name-only --cached | grep -E '\.(js|jsx|ts|tsx)$' || true) | |
| if [[ -z $STAGED_FILES ]] | |
| then | |
| echo 'No relevant staged files, no need to run eslint.' | |
| exit # no relevant staged files, no need to run eslint | |
| fi | |
| # Checks if any staged files have unstaged changes |
| regionFrom = (lat, lon, distance) => { | |
| distance = distance/2 | |
| const circumference = 40075 | |
| const oneDegreeOfLatitudeInMeters = 111.32 * 1000 | |
| const angularDistance = distance/circumference | |
| const latitudeDelta = distance / oneDegreeOfLatitudeInMeters | |
| const longitudeDelta = Math.abs(Math.atan2( | |
| Math.sin(angularDistance)*Math.cos(lat), | |
| Math.cos(angularDistance) - Math.sin(lat) * Math.sin(lat))) |
| const express = require('express') | |
| const path = require('path') | |
| const app = express() | |
| const port = process.env.PORT || 3000 | |
| const mysql = require('mysql') | |
| const connection = mysql.createConnection({ | |
| host:'127.0.0.1', | |
| port:'8889', | |
| user:'root', | |
| password:'root', |
| const sleep = time => new Promise(resolve => setTimeout(resolve, time)) | |
| const teste = async() => { | |
| console.log('ola') | |
| await sleep(1000) | |
| console.log('depois do sleep') | |
| } | |
| teste() |
I hereby claim:
To claim this, I am signing this object:
| const mdns = require('mdns') | |
| const Client = require('castv2-client').Client | |
| const DefaultMediaReceiver = require('castv2-client').DefaultMediaReceiver | |
| const playMedia = host => { | |
| const client = new Client() | |
| client.connect(host, () => { | |
| console.log('connected') | |
| client.launch(DefaultMediaReceiver, (err, player) => { |
| const mdns = require('mdns') | |
| const browser = mdns.createBrowser(mdns.tcp('googlecast')) | |
| browser.on('serviceUp', service => { | |
| const { md, fn } = service.txtRecord | |
| console.log(md, fn) | |
| }) | |
| browser.on('serviceDown', service => { | |
| const { md, fn } = service.txtRecord | |
| console.log(md, fn) |
| mongodump --uri "mongodb://<user>:<passwd>@<server1>:27017,<server2>:27017,<server3>:27017/<dbName>?ssl=true&replicaSet=<replicaSetName>&authSource=admin" |