Skip to content

Instantly share code, notes, and snippets.

View geek's full-sized avatar
🏠
Working from home

Wyatt Preul geek

🏠
Working from home
View GitHub Profile
@fwielstra
fwielstra / api.js
Created June 14, 2011 14:46
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
@geek
geek / .bashrc
Created November 27, 2012 18:13
Set path to node_modules bin
export PATH="$HOME/bin:$PATH"
##### NPM STUFF
# Checks that the child directory is a subdirectory of the parent
is_subdirectory() {
local child="$1"
local parent="$2"
if [[ "${child##${parent}}" != "$child" ]]; then
return 0
@geek
geek / install.md
Last active December 1, 2020 12:30
Installing and running SmartOS on OSX with VirtualBox
From 626c8ac5634c543a3e922e60c83b0e2dfdd5b094 Mon Sep 17 00:00:00 2001
From: Timothy J Fontaine <tjfontaine@gmail.com>
Date: Mon, 11 Nov 2013 02:09:12 +0000
Subject: [PATCH] src: HandleWrap::OnClose needs HandleScope
---
src/handle_wrap.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
#!/usr/sbin/dtrace -s
pid$1::*HandleScopeC1*:entry
{
self->cone++;
}
pid$1::*HandleScopeD1*:entry
/self->cone/
{
@pjobson
pjobson / remove_mcafee.md
Last active March 26, 2024 04:26
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.

@mikew
mikew / 00-README.md
Last active November 23, 2015 16:38
docker-machine create -d vmwarefusion
docker_machine_create_vmwarefusion () {
  name="${1:-test}"
  dir="${HOME}/.docker/machine/machines/${name}"
  vmx="${dir}/${name}.vmx"
  vmrun="/Applications/VMware Fusion.app/Contents/Library/vmrun"

  # Something about the initial run of docker-machine+vmwarefusion needs sudo
  sudo $(which docker-machine) -D create -d vmwarefusion "${name}"