If you don't have homebrew installed - get homebrew here
Then run: brew install elasticsearch
Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml
.
function safeJSONStringify (input, maxDepth) | |
{ | |
var output, | |
refs = [], | |
refsPaths = []; | |
maxDepth = maxDepth || 5; | |
function recursion (input, path, depth) |
If you don't have homebrew installed - get homebrew here
Then run: brew install elasticsearch
Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml
.
So, I was developing a node shell script and wanted to determine the time it took from start, to finish to generate the output of a file. Simple, right? It is, but the problem is that if you want a clean way to do it... you have to develop it, otherwise you'll have a lot of wrapper code surrounding methods and such. So I wrote a small method to simplify it even further.
Benchmark Method:
function benchmark (method) {
var start = +(new Date);
method && method(function (callback) {
var end = +(new Date);
# This is the nuclear option. Use with extreme care | |
# Works up to and including Mountain Lion (10.8.x) | |
# Show all extended attributes | |
ls -lOe ~/dir-to-fix | |
# Remove no-change attributes | |
sudo chflags nouchg ~/dir-to-fix | |
# Recursively clear all entended attributes |
#!/bin/bash | |
# ---------------------------------------------------------------------------------- | |
# Script for checking the temperature reported by the ambient temperature sensor, | |
# and if deemed too high send the raw IPMI command to enable dynamic fan control. | |
# | |
# Also get CPU temps from lm-sensors and adjust fan speeds according to defined | |
# speed % which should be set according to your needs (each CPU model will vary) | |
# | |
# Requires: |
# Add to your zsh profile | |
function devicepid() { | |
if [ -z "$1" ]; then | |
echo "Usage: devicepid <device-name> <search>" | |
echo "Example: devicepid 'iPhone 15 Pro Max' SpringBoard" | |
return 1 | |
fi | |
if [ -z "$2" ]; then |
Please go to Enable Docker Remote API with TLS client verification.
I wanted my (NTFS) data disk to be accessible from my boot camp Parallels VM. Parallels provides no support for this, so I tried it myself.
I duplicated the disk file that Parallels created and started poking around, and after half an hour or so, had success. This is what you need to do.
My boot camp disk is at /dev/disk0
. My data disk is at /dev/disk1
.
These instructions are provided for educational use only and without guarantees. If you lose data because of this, blame yourself, and only follow them if you know what you are doing.
image: an-image-with-docker-and-docker-compose | |
variables: | |
DOCKER_TLS_VERIFY: "1" | |
DOCKER_CERT_PATH: ".docker" | |
before_script: | |
- mkdir -p $DOCKER_CERT_PATH | |
- echo "$DOCKER_CA" > $DOCKER_CERT_PATH/ca.pem | |
- echo "$DOCKER_CERT" > $DOCKER_CERT_PATH/cert.pem |