Skip to content

Instantly share code, notes, and snippets.

View aj07's full-sized avatar

aj07 aj07

  • Open Source
  • Remote
View GitHub Profile
@aj07
aj07 / end and $and
Created June 6, 2015 06:51
problem of $end solving approach?
require 'ffi'
require 'capn_proto'
ADDRESSBOOK_SCHEMA = File.expand_path("../addressbook.capnp", __FILE__)
module AddressBook extend CapnProto::SchemaLoader
load_schema(ADDRESSBOOK_SCHEMA)
end
extend FFI::Library
ffi_lib FFI::Library::LIBC
attach_function :puts, [ :string ], :int
$end
module MyLibrary
extend FFI::Library
ffi_lib "./mylibrary.so"
attach_function :createLight, [],:pointer
attach_function :destroyLight, [:pointer], :void
attach_function :toggleLight, [:pointer], :void
attach_function :declareLight, [:pointer], :void
module MyLibrary
extend FFI::Library
ffi_lib "./addressbook.so"
attach_function :writeAddressbook,
[], :pointer
attach_function :readAddressbook, [], [:pointer],:void
end
module MyLibrary
extend FFI::Library
ffi_lib "./addressbook.so"
attach_function :writeAddressbook,
[], :pointer
attach_function :readAddressbook, [], [:pointer],:void
end
module MyLibrary
extend FFI::Library
ffi_lib "./addressbook.so"
attach_function :writeAddressbook,
[], :pointer
attach_function :readAddressbook, [], [:pointer],:void
end
module MyLibrary
extend FFI::Library
ffi_lib "./addressbook.so"
attach_function :writeAddressbook,
[], :pointer
attach_function :readAddressbook, [], [:pointer],:void
end
module MyLibrary
extend FFI::Library
ffi_lib "./addressbook.so"
attach_function :writeAddressbook,
[], :pointer
attach_function :readAddressbook, [], [:pointer],:void
end
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
class Addressbook
{
status;
public:
Addressbook();
void Id();
@aj07
aj07 / fk.rb
Last active August 29, 2015 14:27
* No new notes to display.
root@system:/home/ankit# rvm implode
No command 'rvm' found, but there are 21 similar ones
rvm: command not found
@aj07
aj07 / luck.rb
Last active August 29, 2015 14:27
6-Sun-05:56 [~] $ rails new blog
exist
identical README.rdoc
identical Rakefile
identical config.ru
identical .gitignore
identical Gemfile
exist app
identical app/assets/javascripts/application.js
identical app/assets/stylesheets/application.css