Skip to content

Instantly share code, notes, and snippets.

View bla.bash
➜ nemo git:(master) ✗ git pull origin master
From github.secureserver.net:PC/nemo
* branch master -> FETCH_HEAD
warning: fetch updated the current branch head.
fast-forwarding your working tree from
commit caeff76c17960adf7fc123a27b9e8a9f2d7205b7.
error: Your local changes to the following files would be overwritten by merge:
nemo/Gemfile
nemo/Gemfile.lock
nemo/app/themes/001/V1/assets/images/thumb_large.png
@threadhead
threadhead / gist:9491295
Last active Aug 29, 2015
Celluloid IO Looper
View gist:9491295
require 'celluloid'
require 'celluloid/io'
class MyPoll
include Celluloid::IO
finalizer :shutdown
def initialize
@socket = TCPSocket.open('192.168.0.55', 2222)
end
@threadhead
threadhead / Another Report from CrashReporter
Created May 20, 2011
Ruby Crash Report - Ruby 1.9.2-p180
View Another Report from CrashReporter
Process: ruby [68562]
Path: /Users/karl/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
Identifier: ruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [68198]
Date/Time: 2011-06-02 21:58:01.229 -0700
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 6
View gist:659862
// DAQROUTINES.H
//
//Header file for DaqRoutines.cpp
#ifndef DAQROUTINESH
#define DAQROUTINESH
#define daqbook100 0x00000001
#define daqbook112 0x00000002
#define daqbook120 0x00000004
View gist:659861
//---------------------------------------------------------------------------
// DAQX.H
//
// Header for the Enhanced API Data Acquisition Library.
///
//---------------------------------------------------------------------------
#ifndef DAQ_H
#define DAQ_H
View gist:659856
// 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>
View daq_test.i
%module daq_test
%{
extern char* GetDeviceName;
%}
extern char* GetDeviceName;
View gist:659846
#ifndef GETDEVICENAME_H
#define GETDEVICENAME_H
extern "C" {
char* GetDeviceName();
};
#endif
View Help for Beginner - Compiling C Extension on Windows
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
View gist:300918
# 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)