Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.
$ brew cask install virtualbox
Now install Vagrant either from the website or use homebrew for installing it.
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
#!/bin/bash | |
# | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Requires bc, dc, openssl, xxd | |
# | |
# by grondilu from https://bitcointalk.org/index.php?topic=10970.msg156708#msg156708 | |
base58=({1..9} {A..H} {J..N} {P..Z} {a..k} {m..z}) | |
bitcoinregex="^[$(printf "%s" "${base58[@]}")]{34}$" |
##### setup start | |
BATS_TEST_NAME: test_example_status_and_output-2c_lines | |
BATS_TEST_FILENAME: /home/bats/test.bats | |
BATS_TEST_DIRNAME: /home/bats | |
BATS_TEST_NAMES: test_example_status_and_output-2c_lines | |
BATS_TEST_DESCRIPTION: example status and output, lines | |
BATS_TEST_NUMBER: 1 | |
BATS_TMPDIR: /tmp | |
##### setup end | |
example 1 |
# Install | |
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
# Update |
# Add field | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
# { | |
# "hello": "world", | |
# "foo": "bar" | |
# } | |
# Override field value | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
{ |
#!/usr/bin/env bash | |
typeofvar () { | |
local type_signature=$(declare -p "$1" 2>/dev/null) | |
if [[ "$type_signature" =~ "declare --" ]]; then | |
printf "string" | |
elif [[ "$type_signature" =~ "declare -a" ]]; then | |
printf "array" |
function exportSpreadsheet() { | |
//All requests must include id in the path and a format parameter | |
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
//FORMATS WITH NO ADDITIONAL OPTIONS | |
//format=xlsx //excel | |
//format=ods //Open Document Spreadsheet | |
//format=zip //html zipped | |
.PHONY: clean-pyc clean-build docs clean | |
define BROWSER_PYSCRIPT | |
import os, webbrowser, sys | |
try: | |
from urllib import pathname2url | |
except: | |
from urllib.request import pathname2url | |
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) | |
endef |
// find element without pair in array | |
def solution(A): | |
A.sort() | |
for index in range(0,len(A),2): | |
if A[index] != A[index+1]: | |
return A[index] | |
B = [5,6,2,9,2,3,6,7,3,1,7,9,1] | |
print(solution(B)) |