Skip to content

Instantly share code, notes, and snippets.

will@wdg-mbp ~
% rvm list !7119
rvm rubies
jruby-1.7.4 [ x86_64 ]
maglev-head [ x86_64 ]
rbx-2.0.0 [ broken ]
ruby-1.9.3-p194 [ x86_64 ]
ruby-1.9.3-p392 [ x86_64 ]
@hotgazpacho
hotgazpacho / gist:6855303
Last active December 24, 2015 20:08
Error installing Rubinius with rvm
will@wdg-mbp ~
% rvm install rbx !7104
zsh: correct 'rbx' to '.rbx' [nyae]? n
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/rbx-2.0.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Checking requirements for osx.
(eval):1: failed to compile regex: empty (sub)expression
(eval):1: failed to compile regex: empty (sub)expression
Move-Item : A positional parameter cannot be found that accepts argument 'c:\Dev\MyProject\Core\UserInterface\MyProject.Core.UserInterface.Tests\Views\When_binding_a_list_of_report_templates_to_the_view.should_bind_report_templates_to_the_view.approved.png'.
At line:1 char:1
using System;
using System.Collections.Generic;
using System.Data.Common;
using ApprovalTests.Persistence;
using ApprovalUtilities.Persistence.Database;
using QueryObjects;
using NHibernate;
using NHibernate.AdoNet.Util;
namespace Approvals
@hotgazpacho
hotgazpacho / gist:5467420
Created April 26, 2013 13:36
WTF, PowerShell?
C:\Users\will> Get-PoshCode 2493
Set-DownloadFlag : Cannot process argument transformation on parameter 'Zone'. Cannot convert the
"<System.Security.Policy.Zone version="1">
<Zone>Internet</Zone>
</System.Security.Policy.Zone>
" value of type "System.Security.Policy.Zone" to type "System.Security.SecurityZone".
At C:\Users\will\Documents\WindowsPowerShell\Modules\PoshCode\PoshCode.psm1:311 char:66
+ Get-WebFile "$($url)?dl=$id" | ConvertTo-Module | Set-DownloadFla ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Set-DownloadFlag], ParameterBindingArgumentTransformationException
@hotgazpacho
hotgazpacho / gist:5382905
Created April 14, 2013 14:21
rvm install maglev --trace
➜ ~ rvm install maglev --trace
maglev --trace
rvm 1.19.4 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
+__rvm_parse_args:681> [[ -n 5.0.2 ]]
+__rvm_parse_args:716> [[ -z install ]]
+__rvm_parse_args:719> [[ error == install || 0 -eq 1 || -n '' ]]
+__rvm_parse_args:16> [[ -n '' ]]
+__rvm_parse_args:724> : rvm_ruby_args:0::
@hotgazpacho
hotgazpacho / gist:5380116
Created April 13, 2013 21:17
rvm install maglev --debug
➜ ~ rvm install maglev --debug
grep: Desktop: Is a directory
grep: Development: Is a directory
grep: Documents: Is a directory
grep: Downloads: Is a directory
grep: Dropbox: Is a directory
grep: Library: Is a directory
grep: Movies: Is a directory
grep: Music: Is a directory
grep: Pictures: Is a directory
module HStoreProperties
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def boolean_h_store_fields_for(property_names)
property_names.each do |key|
attr_accessible key
scope "has_#{key}", lambda { |value| where('properties @> (? => ?)', key, value) }
@hotgazpacho
hotgazpacho / Decompiled.cs
Last active December 14, 2015 15:08
Dynamic Iteration Repo
using Microsoft.CSharp.RuntimeBinder;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace DynamicCompilation
{
public class DynamicCompilation
{
@hotgazpacho
hotgazpacho / gist:5062413
Created March 1, 2013 04:09
This code works fine on my local machine, but when I run it on the build server, I get the exception below
static void CreateTemplateDatabase(SqlConnectionStringBuilder csb)
{
var migration = new Migrate().Set(c =>
{
c.ConnectionString = csb.ConnectionString;
c.SqlFilesDirectory = string.Format(@"{0}\Database", TempDir);
c.RestoreFromPath = string.Format(@"{0}\Database\MyProject.bak", TempDir);
c.Silent = true;
c.Restore = true;
c.SchemaName = "Iddeal";