Skip to content

Instantly share code, notes, and snippets.

View ox's full-sized avatar
👹
what is this, AIM?

Artem Titoulenko ox

👹
what is this, AIM?
View GitHub Profile
@ox
ox / gist:4990617
Last active December 13, 2015 23:19
#define number_of_structs 100;
struct test {
int a;
int b;
};
int i;
struct test tests[number_of_structs];
@ox
ox / main.rb
Last active December 11, 2015 10:49
#!/usr/bin/env ruby
# generates a matrix and display groups (blobs) in the matrix
# without arguments, generates a 5 * 5 matrix
# usage: blobs.rb [cols] [rows]
# example
# generated:
# [0, 0, 1, 0, 1]
# [0, 0, 0, 0, 1]
# [0, 0, 0, 0, 1]
- posts.each do |post|
%a{href: post.url} post.title
%br
@ox
ox / post.haml
Created December 24, 2012 07:50
%h2= post.title
%p= post.content
@ox
ox / layout.haml
Last active December 10, 2015 02:28
!!!
/[if lt IE 7 ] <html class="ie ie6" lang="en">
/[if IE 7 ] <html class="ie ie7" lang="en">
/[if IE 8 ] <html class="ie ie8" lang="en">
/[if (gte IE 9)|!(IE)] <html lang="en">
%head
%meta{:charset => "utf-8"}
%title Your Page Title Here :)
%meta{ :name => "description", :content => ""}
%meta{ :name => "author", :content => ""}
{
"title": "Artem's Blog",
"templates": {
"site": "https://gist.github.com/raw/4368257/982eb4ec1a0ac1325a28b6d7441841cf12bbd3c1/layout.haml" ,
"index": "https://gist.github.com/raw/4368269/5ca585c21117ce9089e4b669cbc32c4c13897a47/index.haml" ,
"post": "https://gist.github.com/raw/4368266/c3c3c604287d712eea42d8d1ef5fee97b974cbaf/post.haml"
},
"posts": [
"https://gist.github.com/raw/4262944/6640063782449d8fc9acb3d6f6b99c59224b7428/index.md",
"https://gist.github.com/raw/4257911/53e959549f93cb5200e30d58ce632d65104f4852/foo.md"
@ox
ox / pages.py
Created December 17, 2012 23:05
import sys
from os.path import exists
import subprocess
import re
# Calls the R system specifying that commands come from file commands.R
# The commands.R provided with this assignment will read the file named
# data and will output a histogram of that data to the file pageshist,pdf
def runR( ):
res = subprocess.call(['R', '-f', 'commands.R'])
@ox
ox / client.h
Created December 12, 2012 23:51
the client struct
#ifndef _CLIENT_H
#define _CLIENT_H
#include "order.h"
struct Client {
char * name;
int id;
double credit;
@ox
ox / index.md
Created December 11, 2012 22:31
Syntax Highlighting Check in gist.io

Can gist.io actually do syntax highlighting?

Lets check:

def foo(bar)
  puts "foo #{bar}"
  sleep(1)
end
@ox
ox / foo.md
Created December 11, 2012 11:30
The Rise of Foo

The Rise of Foo

  def hello(world)
    puts world
  end
  
  def bar(color)
    puts "I love #{color}"
 end