Skip to content

Instantly share code, notes, and snippets.

View mattpetters's full-sized avatar

matt petters mattpetters

  • San Diego
  • 12:01 (UTC -07:00)
View GitHub Profile
@mattpetters
mattpetters / _.md
Created November 7, 2015 00:28
reddit baseforktable
@mattpetters
mattpetters / _.md
Created November 8, 2015 02:38
povrates
@mattpetters
mattpetters / _.md
Last active November 8, 2015 15:19
povrates
@mattpetters
mattpetters / _.md
Created November 8, 2015 15:53
Tributary inlet

#Setting up ESXi for running Apple Mac OS X Vmware ESXi 6.0 doesn’t support OS X out of the box.

So, the first thing you need to do is to customise the hypervisor layer by executing an Unlocker script by insanelymac.com. Please note that you will need to register on the site in order to download the Unlocker tool. You need to enable SSH on your ESXi host. In order to do that, login to the host using VMware vShpere Client and navigate to Configuration->Security Profile. From here click on Properties in the upper right corner where it says Services. The dialog Services Properties should appear and from here you can click on SSH->Options and choose Start and stop with host. Click Start and then close all the open dialogs. Transfer the Unlocker-files to the host using any SFTP client. Make sure you extract the files somewhere on your client before transfer and connect to the ESXi host using the user root. Once connected navigate to /vmfs/volumes/datastore01/ , replacing datastore01 with your actual datastore na

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Modern Navigation 2</title>
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/custom.css" />
<link href='http://fonts.googleapis.com/css?family=Raleway:800' rel='stylesheet' type='text/css'>
<script src="js/vendor/modernizr.js"></script>
@mattpetters
mattpetters / of.scpt
Last active April 8, 2017 20:40
Applescript for Omnifocus that outputs a string with a random due soon task, the number of due soon tasks, and number of flagged tasks
tell application "OmniFocus"
tell front document
-- Get the list of tasks
set theDueTasks to every flattened task where its completed = false and due date is greater than (current date) and due date is less than (current date) + (7 * days)
set theFlaggedTasks to every flattened task where its flagged = true and completed = false
set dueCount to count of theDueTasks
set flagCount to count of theFlaggedTasks
if theDueTasks is not equal to {} then
-- get a random number
set randomNumber to (random number from 1 to dueCount)
$ wget http://downloads.sourceforge.net/project/glfw/glfw/3.0.1/glfw-3.0.1.zip
$ unzip glfw-3.0.1.zip
$ cd glfw-3.0.1/
$ mkdir build
$ cd build
$ export MACOSX_DEPLOYMENT_TARGET=10.8
$ cmake -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="i386;x86_64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang ../
$ make
$ ls -l src/libglfw*
while (sc.hasNextLine()){
String line = sc.nextLine();
if (line.isEmpty()){
continue;
} else {
String node = nextLine;
String anotherLine = sc.nextLine();
while (!anotherLine.isEmpty()) {
String[] neighborInfo = anotherLine.split("\\s+");
String neighborNode = neighborInfo[1];