Skip to content

Instantly share code, notes, and snippets.

# run on the VM which will provide the image for the vagrant box
# to save a lot of time and disk space, delete any unwanted snapshots from the VM
# based, almost entirely, on http://www.hurryupandwait.io/blog/in-search-of-a-light-weight-windows-vagrant-box
# rename built-in admin account username and pwd to 'vagrant'
$admin=[adsi]"WinNT://./Administrator,user"
$admin.psbase.rename("vagrant")
$admin.SetPassword("vagrant")
$admin.UserFlags.value = $admin.UserFlags.value -bor 0x10000
$admin.CommitChanges()
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you will see an error like this:

$ npm update npm -g
@joaocc
joaocc / index.html
Last active August 29, 2015 14:19 — forked from Fortyseven/index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity Web Player | %UNITY_WEB_NAME%</title>
%UNITY_UNITYOBJECT_DEPENDENCIES%
<script type="text/javascript">
<!--
var unityObjectUrl = "%UNITY_UNITYOBJECT_URL%";
if (document.location.protocol == 'https:')
# filename: install-nvm-npm-node
# author: Lex Sheehan
# purpose: To cleanly install NVM, NODE and NPM
# dependencies: brew
# references: http://lexsheehan.blogspot.com/2015/04/cleanly-install-nvm-node-and-npm.html
NOW=$(date +%x\ %H:%M:%S)
CR=$'\n'
REV=$(tput rev)
OFF=$(tput sgr0)
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
cat <<MAXFILES > /Library/LaunchDaemons/limit.maxfiles.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@joaocc
joaocc / .gitattributes
Created November 24, 2017 15:47 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
#!/bin/bash
set -o nounset
##########################################
# Defaults
##########################################
: ${recipient:=}
: ${host:=localhost}
: ${port:=5432}
: ${databases:=}
@joaocc
joaocc / fulldump.sh
Created March 4, 2019 00:44 — forked from marcolino/fulldump.sh
Postgres full dump script
#!/bin/bash
# $Id: fulldump.sh,v 1.4 2013/10/31 14:25:36 postgres Exp postgres $
# $Source: /var/lib/postgresql/8.2/RCS/fulldump.sh,v $
# $Log: fulldump.sh,v $
#
# Revision 1.4 2013/10/31 14:25:36 postgres
# Removed pg_dump '-D' option, added $RETVAL
# default value for the initial case - MS.
#
# Revision 1.3 2007/09/28 13:29:07 postgres