This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIB=/home/matej/.rvm/rubies/ruby-1.9.2-p290/lib | |
INC=/home/matej/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ | |
CFLAGS=-I$(INC) -I/home/matej/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux/ -g | |
LDFLAGS=-L$(LIB) -ldl -lruby1.9 | |
embed2: embed2.o | |
$(CC) -o embed2 embed2.o $(LDFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Address { | |
char * town; | |
}; | |
struct Person { | |
struct Address * address; | |
char * name; | |
}; | |
static VALUE wrap_person_get_address(VALUE self) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
N.B. this program doesn't include any error checking. In particular you'll have | |
to do all the rb_protect stuff | |
*/ | |
#include <stdio.h> | |
#include "ruby.h" | |
struct Address { | |
char * town; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Inspired by Ruby sources gem initialization | |
void defineRuby() { | |
void Init_prelude(void); | |
RUBY_INIT_STACK; | |
ruby_init(); | |
ruby_init_loadpath(); | |
ruby_script("embed traffic profiller"); | |
rb_define_module("Gem"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/rrdtool/bin/rrdcgi | |
<html> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<head> | |
<title>Dynamic ratio</title> | |
</head> | |
<body> | |
<h1>Dynamic ratio</h1> | |
<div> | |
<p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
import models.Flight; | |
import models.Parent; | |
import models.Thing; | |
import org.junit.After; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bindata' | |
class FlowFileHeader < BinData::Record | |
endian :little | |
uint16 :magic | |
uint16 :version | |
uint32 :flags | |
uint32 :numBlocks | |
string :ident, :read_length => 128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matej@notebook:~/Downloaded/git_test_repo$ mkdir /home/matej/Images/test1 | |
matej@notebook:~/Downloaded/git_test_repo$ touch /home/matej/Images/test1/foo1 | |
matej@notebook:~/Downloaded/git_test_repo$ mkdir /home/matej/Documents/test2 | |
matej@notebook:~/Downloaded/git_test_repo$ touch /home/matej/Documents/test2/foo2 | |
matej@notebook:~/Downloaded/git_test_repo$ cd .. | |
matej@notebook:~/Downloaded$rm -rd git_test_repo | |
matej@notebook:~/Downloaded$ mkdir git_test_repo | |
matej@notebook:~/Downloaded$ git --git-dir=./git_test_repo/ init | |
Initialized empty Git repository in /home/matej/Downloaded/git_test_repo/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project --topLevelPackage cz.spring.swagger | |
persistence setup --database H2_IN_MEMORY --provider HIBERNATE | |
entity jpa --class cz.spring.swagger.domain.Word | |
field string --fieldName name --notNull true --unique true | |
field string --fieldName definition --notNull true | |
json all | |
controller all --package cz.spring.swagger.controller | |
web mvc json all | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void HelloWorld(){ | |
System.out.println("Hello World"); | |
} |
OlderNewer