Skip to content

Instantly share code, notes, and snippets.

View nmanzi's full-sized avatar
🌀
In a maelstrom of self indulgence.

Nathan Manzi nmanzi

🌀
In a maelstrom of self indulgence.
View GitHub Profile
@nmanzi
nmanzi / NetApp-ActiveDedupAlert.ps1
Created February 24, 2015 08:41
NetApp-ActiveDedupAlert.ps1
#region Help
# ----------
<#
.SYNOPSIS
NetApp-ActiveDedupAlert.ps1 will send an email to a specified address if it detects a running SIS process on
any volume belonging to specified controllers.
Highlights:
@nmanzi
nmanzi / NetApp-SnapshotReport.ps1
Created February 27, 2015 02:30
NetApp-SnapshotReport.ps1
#region Help
# ----------
<#
.SYNOPSIS
NetApp-SnapshotReport.ps1 will send an email to a specified address with a list of detected volume snapshots on
any volume belonging to specified controllers.
Highlights:
# Highlights code contained within the post according to a given language.
def highlight_code string
post_text = string.gsub(/\r\n/, "\n")
# From Markdown.pl by John Gruber
regex = /(?:\n\n|\A)((?:(?:[ ]{4} | \t).*\n+)+)((?=^[ ]{0,4}\S)|\Z)/ix
matches = post_text.scan(regex)
for match in matches
@nmanzi
nmanzi / ShatnerRoll.js
Created August 24, 2009 05:28
Shatner Roll code as used on RailsRumble '09 website.
hasRumbling = false
shatnerLoaded = false;
function stillRumbling()
{
if(hasRumbling) return;
if(!shatnerLoaded) {
$(new Image()).load(function() {
shatnerLoaded = true;
stillRumbling();
'======================================================================================
' Title: lastlogon.vbs
'
' Purpose: Prints out last logon of all users
'
' Usage: cscript <path> lastlogon.vbs > <outfile>
'======================================================================================
Option Explicit
Const strProgramName = "lastlogon.vbs"
class Config
@@attributes = [:theme, :lang, :line_numbers, :current_themes]
cattr_accessor @@attributes
self.line_numbers = true
end
change this
<<<<<<< HEAD
case modifier
when 'A', 'M'
puts "Uploading #{file}"
ftp.put(file, file)
when 'D'
begin
puts "Deleting #{file}"
hadricus@solaris:~/Programming/Ruby/rails/rails3/lktysplt [blog*]$ AUTOFEATURE=true autotest
<internal:lib/rubygems/custom_require>:29: warning: loading in progress, circular require considered harmful - /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb
from /Users/hadricus/.rvm/gems/ruby-1.9.2-p0@rails3/bin/autotest:12:in `<main>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:1136:in `<top (required)>'
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:968:in `load_plugins'
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:968:in `each'
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:976:in `block in load_plugins'
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:976:in `load'
@nmanzi
nmanzi / SerialSave.rb
Created September 6, 2011 11:41
Save n*bytes worth of serial input directly to file
#!/usr/bin/ruby -wKU
require "rubygems"
require "serialport"
device = ARGV[0] ? ARGV[0] : nil
input_size = ARGV[1] ? ARGV[1] : nil
output_file = ARGV[2] ? ARGV[2] : nil
if !input_size || !output_file || !device
Kernel.exit
@nmanzi
nmanzi / syn.sh
Created January 12, 2012 23:56
open file with Synalyze It! within cli
#!/bin/bash
open $1 -a "/Applications/SynalyzeIt.app"