Skip to content

Instantly share code, notes, and snippets.

View DanSearle's full-sized avatar

Daniel Searle DanSearle

View GitHub Profile
@DanSearle
DanSearle / gist:fc03eb85dfd0a5cc8ab1
Created August 23, 2014 09:24
Scan arp cache to find duplicate ip addresses
sudo arp-scan -I eth0 -l
@DanSearle
DanSearle / BootstrapNode.ps1
Last active December 19, 2015 14:58
Powershell script to create seperate a node and npm environment for a project without the need to have it installed on the machine. This aids development with node and npm based tools for web development on windows. This script will launch a powershell enviroment with node and npm setup for the project.
function download_node {
param([string]$node_directory, [string]$node_version)
$node_exe = (Join-Path $node_directory "node.exe")
if (Test-Path $node_exe) {
Write-Host "Doing nothing as $node_exe exists"
return
}
if (!$node_version) {
@DanSearle
DanSearle / BootstrapNode.py
Created December 19, 2015 16:42
Python script for Linux to create a local node and npm install for a project. The environment can be activated by sourcing bin/activate
import os
import urllib
import json
import platform
import tarfile
import shutil
import urllib2
ACTIVATE_SH = """
export PATH="{0}:$PATH"