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
hadricus@solaris:~/Development/Ruby/rails/blog (local)$ bundle install
Fetching source index for http://rubygems.org/
Installing rake (0.9.2.2)
Installing RedCloth (4.2.9) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/hadricus/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
@nmanzi
nmanzi / AustnetDCCAllowTrigger.scpt
Created August 2, 2012 06:40
Austnet DCC Allow via CTCP
using terms from application "Colloquy"
on process subcode request command with args from user on conn
if command is "DCCALLOW" then
send raw command ("dccallow +" & user's name) to conn
tell user
send message ("DCC Allow request accepted")
end tell
return true
end if
@nmanzi
nmanzi / extractrar.ps1
Created October 14, 2012 09:21
Extract all RAR files under the current directory (requires unrar.exe in %PATH%)
Get-ChildItem | ?{ $_.PSIsContainer } | ForEach-Object {Get-ChildItem $_ *.rar | select-object -first 1 | foreach-object {unrar x $_.FullName}}
Function ViewVM-SetState {
[cmdletBinding()]
Param (
[parameter(Mandatory=$true)]
[string]$vm, #VM name
[parameter(Mandatory=$true)]
[ValidateSet("MAINTENANCE","READY","DELETING","ERROR")]
[string]$state #State to set the VM to
)
DDavkTFBmKe5VNtQZftq3NJLncD6FWnQNz
#region Help
# ----------
<#
.SYNOPSIS
OracleZFS-StorageConsumptionReport.ps1 will send an email to a specified address when executed
with a list of projects (according to a filter) and the consumed backup storage for each project.
Highlights:
[CmdletBinding(SupportsShouldProcess=$False)]
Param (
[parameter(
Mandatory=$true,
HelpMessage='Filter jobs by name')]
[string]$Filter,
[parameter(
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: #EEE;}
.emubox {
border: 3px solid green;
padding: 10px;
}
.container{
source "https://rubygems.org"
gem "active_type", ">= 0.3.2"
gem "autoprefixer-rails", ">= 5.0.0.1"
gem "bcrypt", "~> 3.1.7"
gem "bootstrap_form", "~> 2.3"
gem "bootstrap-sass", "~> 3.3"
gem "bootscale", :require => false
gem "coffee-rails", "~> 4.2"
gem "dotenv-rails", ">= 2.0.0"
require 'rails_helper'
RSpec.describe WorkerUser, type: :model do
it "has a valid factory" do
expect(build(:worker_user)).to be_valid
end
context "validation" do
let(:user) { build(:worker_user) }