Skip to content

Instantly share code, notes, and snippets.

View vertiginous's full-sized avatar

Gordon Thiesfeld vertiginous

View GitHub Profile
@vertiginous
vertiginous / gist:801907
Created January 29, 2011 15:16
File#realpath behavior on Windows
C:\>ruby --disable-gems -S irb
irb(main):001:0> File.realpath('repo')
### FindFirstFileW ( "C:\repo", 0x0028e800 )
### FindClose ( 0x00754d10 )
=> "C:/repo"
irb(main):002:0> File.expand_path('repo')
### FindFirstFileA ( "C:/repo", 0x0028eac0 )
#include <windows.h>
#include <stdio.h>
int run(CHAR *path)
{
WIN32_FILE_ATTRIBUTE_DATA wfad;
int a, e;
printf("Checking '%s'\n", path);
a = GetFileAttributesEx(path, GetFileExInfoStandard, &wfad);
var Scheduler = {};
Scheduler.minDate = new Date(2011, 2, 7);
Scheduler.maxDate = new Date(2011, 2, 11);
Scheduler.update_time = function(value, element) {
var date = new Date(Scheduler.minDate.getTime());
date.setTime(date.getTime() + value);
element.val(date.strftime("%a %R"));
};
var Scheduler = function(){
this.minDate = new Date(2011, 2, 7);
this.maxDate = new Date(2011, 2, 11);
this.update_time = function(value, element) {
var date = new Date(this.minDate.getTime());
date.setTime(date.getTime() + value);
element.val(date.strftime("%a %R"));
};
@vertiginous
vertiginous / my_changes.diff
Created February 25, 2011 16:45
compile errors
C:\Users\gthiesfeld\Work\repo\rubyinstaller>rake interpreter:shoes:compile
(in C:/Users/gthiesfeld/Work/repo/rubyinstaller)
Temporarily enhancing PATH to include DevKit...
cd C:/Users/gthiesfeld/Work/repo/rubyinstaller/sandbox/shoes
rake -t
(in C:/Users/gthiesfeld/Work/repo/rubyinstaller/sandbox/shoes)
The system cannot find the path specified.
cp platform/msw/shoes.ico shoes/appwin32.ico
** Invoke default (first_time)
** Invoke build (first_time)
### How *I think* -n works ###
# install:
$ rvm install --branch hydra rbx-nhydra
#use:
$ rvm rbx-nhydra
### How I wish it worked ###
# install:
$ rvm install --branch hydra rbx -n hydra