Disable:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Enable:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Disable:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Enable:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| def xpath_soup(element): | |
| # type: (typing.Union[bs4.element.Tag, bs4.element.NavigableString]) -> str | |
| """ | |
| Generate xpath from BeautifulSoup4 element. | |
| :param element: BeautifulSoup4 element. | |
| :type element: bs4.element.Tag or bs4.element.NavigableString |
| import asyncio | |
| loop = asyncio.get_event_loop() | |
| async def hello(): | |
| await asyncio.sleep(3) | |
| print('Hello!') | |
| if __name__ == '__main__': | |
| loop.run_until_complete(hello()) | |
| [core] | |
| # The home folder for airflow, default is ~/airflow | |
| airflow_home = /Users/p1nox/airflow | |
| # The folder where your airflow pipelines live, most likely a | |
| # subfolder in a code repository | |
| dags_folder = /Users/p1nox/airflow/dags | |
| # The folder where airflow should store its log files. This location | |
| base_log_folder = /Users/p1nox/airflow/logs |
| def knapsack_aux(x: (Int, Int), is: List[Int]): List[Int] = { | |
| for { | |
| w <- is.zip(is.take(x._1) ::: is.take(is.size - x._1).map(_ + x._2)) | |
| } yield math.max(w._1, w._2) | |
| } | |
| def knapsack_rec(xs: List[(Int, Int)], is: List[Int]): List[List[Int]] = { | |
| xs match { | |
| case x :: xs => knapsack_aux(x, is) :: knapsack_rec(xs, knapsack_aux(x, is)) | |
| case _ => Nil |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| //Database connection | |
| var uristring = 'mongodb://localhost/test'; | |
| var mongoOptions = { }; | |
| mongoose.connect(uristring, mongoOptions, function (err, res) { | |
| if (err) { | |
| console.log('Error when connecting to: ' + uristring + '. ' + err); |
db.votes.aggregate([{
$lookup: {
from: "users",
localField: "createdBy",
foreignField: "_id",
#!/bin/sh
# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 | grep docker@docker.com || exit 1
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
| --- | |
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: {name: content} | |
| data: | |
| index.html: '<html><body><h1>Hello world</h1></body></html>' | |
| --- | |
| apiVersion: apps/v1beta2 | |
| kind: Deployment | |
| metadata: {name: lb} |