Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use ElkM1::Control;
use Switch;
use Log::Log4perl qw(:easy);
use HTTP::Date;
use strict;
use File::Basename;
use File::Spec;
Sub main(params)
Set WshShell = CreateObject( "WScript.Shell" )
WshShell.Run("ruby C:\PROGRA~1\homeseer\scripts\ThermoLogger.rb " & params )
End Sub
# require 'rubygems'
require 'mysql'
require 'time'
puts "[#{File.basename(__FILE__)}] running..."
time_in = Time.now
time_in_db = time_in.strftime("%Y-%m-%d %H:%M:%S")
puts "start time: " << time_in.strftime("%Y-%m-%d %H:%M:%S")
rails compass_test
cd compass_test/
rake rails:template LOCATION=http://compass-style.org/rails/installer
script/generate nifty_scaffold building name:string --haml
script/generate nifty_layout --haml
rake db:migrate
-- added stylesheet_link_tag 'compiled/screen.css' to
application.html.haml
script/server
/*
TypeError: can't convert nil into String
Backtrace:
/Users/karl/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.17/lib/sass/files.rb:94:in `join'
/Users/karl/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.17/lib/sass/files.rb:94:in `sassc_filename'
/Users/karl/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.17/lib/sass/files.rb:23:in `tree_for'
/Users/karl/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.17/lib/sass/plugin.rb:96:in `update_stylesheet'
/Users/karl/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.17/lib/sass/plugin.rb:82:in `block (2 levels) in update_stylesheets'
/Users/karl/.rvm/gems/ruby-1.9.1-p378/gems/haml-2.2.17/lib/sass/plugin.rb:77:in `each'
# blatantly copied from: http://snippets.dzone.com/posts/show/5449
# but changed to use hamlify instead of html2haml
# A little script to convert all your .erb views to .haml using hamlify,
# which is included with Haml installation.
# Just drop this in your rails root folder and run it.
class ToHaml
def initialize(path)
PS C:\rails\ext_test\stree\ext\stree> ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
PS C:\rails\ext_test\stree\ext\stree> gcc --version
The term 'gcc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spellin
g of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+ gcc <<<< --version
+ CategoryInfo : ObjectNotFound: (gcc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
@threadhead
threadhead / gist:659846
Created November 2, 2010 16:06
daq_test.h
#ifndef GETDEVICENAME_H
#define GETDEVICENAME_H
extern "C" {
char* GetDeviceName();
};
#endif
@threadhead
threadhead / daq_test.i
Created November 2, 2010 16:08
daq_test.i
%module daq_test
%{
extern char* GetDeviceName;
%}
extern char* GetDeviceName;
@threadhead
threadhead / gist:659856
Created November 2, 2010 16:11
daq_test.cpp
// DAQROUTINES.CPP
//
// uses 32bit enh API
//
// This file contains functions created for the Daq* examples
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>