osascript -e "set volume with output muted"
osascript -e "set volume without output muted"
// Refrence from: https://gist.github.com/beevelop/a0f2c76e79610dca01550c9a93f83876 | |
// Copy following scripts in the developer console of page included markdown content you want to print: | |
(function () { | |
var $ = document.querySelector.bind(document); | |
$('#readme').setAttribute('style', 'position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;background-color:white'); | |
$('#readme>article').setAttribute('style', 'border: none'); | |
$('body').innerHTML = $('#readme').outerHTML; | |
window.print(); | |
})(); |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
#!/bin/bash | |
tmp=$(mktemp -d) | |
pushd "$tmp" | |
iso=/Users/lloeki/Downloads/archlinux-2015.08.01-dual.iso | |
echo "fixing disk" | |
dd if=/dev/zero bs=2k count=1 of=tmp.iso | |
dd if=$iso bs=2k skip=1 >> tmp.iso | |
echo "mounting disk" |
On VMWare fusion, running an Ubuntu Xenial VM, which has a copy of your OS X public SSH key -- the script to build the image will add it to the generated image -- grab the script at https://github.com/zyga/devtools/blob/master/ubuntu-image to create a new image:
./ubuntu-image.sh --developer-mode pc
qemu-img convert pc-devel.img -O vmdk snappy.vmdk
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |
#!/usr/bin/env bash | |
# Install missing Linux From Scratch Host System Requirements for Ubuntu 14.04 | |
if [ ! $(whoami) == "root" ]; then | |
echo "Please run as root!" | |
exit 1 | |
fi | |
# symlink sh to bash | |
ln -fsv /bin/bash /bin/sh |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
namespace Tools | |
{ | |
/// <summary> |