- OS - High Sierra 10.13
- Tensorflow - 1.4
- Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
- Cmake - 3.7
- Bazel - 0.7.0
# Assuming you're a regular user that has doas allowances for vmctl | |
mkdir -p ~/vmm | |
cd ~/vmm | |
# Grab the the one of the virt iso's of Alpine Linux | |
curl https://nl.alpinelinux.org/alpine/v3.6/releases/x86_64/alpine-virt-3.6.0-x86_64.iso -o alpine-virt-3.6.0-x86_64.iso | |
# Make a new virtual disk image, change the size as needed | |
vmctl create alpine-virt.img -s 6G |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# /etc/security/limits.conf | |
* soft nofile 999999 | |
* hard nofile 999999 | |
root soft nofile 999999 | |
root hard nofile 999999 | |
=========================================================== | |
# /etc/sysctl.conf | |
# sysctl for maximum tuning |
#!/usr/bin/env bash | |
# This script prints out all of your Redis keys and their size in a human readable format | |
# Copyright 2013 Brent O'Connor | |
# License: http://www.apache.org/licenses/LICENSE-2.0 | |
human_size() { | |
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
} |
(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)
Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.
(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
#!/bin/sh | |
cd / | |
umount /pref | |
echo 3 > /proc/sys/vm/drop_caches | |
#wifi mode is specified | |
if [ "${1}" == "ap" ]; then | |
echo -e "\nPress CTRL+C now if you want to skip hibernation" | |
echo "killall hostapd" | |
killall hostapd |
import Image, ImageDraw, ImageFont | |
import clipboard | |
# Simple script to create SysML frame around the image | |
# Define non-configurable options here | |
H_TEXT_OFFSET = 20 | |
V_TEXT_OFFSET = 20 | |
H_CUT_OUT = 20 | |
V_CUT_OUT = 20 |
<script> | |
window.onerror = function(message, file, line) { | |
var prop = {} | |
prop.message = message; | |
prop.file = file; | |
prop.line = line; | |
mpq.track('js-err'r,track_properties); | |
} | |
</script> |