Skip to content

Instantly share code, notes, and snippets.

View hugobarauna's full-sized avatar

Hugo Baraúna hugobarauna

View GitHub Profile
Program
program = { decl }
Declarações
decl = type var_list | type id "=" ( id | num | expr ) | func_decl | array | struct.
var_list = id { "," id } "\n".
array = type id "[" num "]" | type id "[" num "]" "=" "{" cte {, cte} "}".
struct = "struct" id "{" struct_var_list "}"
struct_var_list = type id "\n" { type id "\n" }.
type = "int" | "char" | "float" | "bool" | "void".
Rails CMS alternatives
======================
Active projects:
---------------
adva-cms
repo: http://github.com/svenfuchs/adva_cms/
site: http://adva-cms.org/
Last update: 11/24/09
"the cutting edge Rails CMS platform"
#!/bin/sh
# Install ImageMagick on Snow Leopard: by kain, improved by mislav and samsoffes
# http://www.icoretech.org/2009/08/install-imagemagick-in-leopard-snow-leopard/
# Work with 64bit kernel mode
set -e
PREFIX=/usr/local
# Passenger users: amend your Apache global configuration with the following directive
# SetEnv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
@hugobarauna
hugobarauna / gist:2351792
Created April 10, 2012 14:35
Why you should use NFS over VirtualBox with Vagrant
If you're using Vagrant, you're probably using VirtualBox shared folders feature in order to access your files from inside the VM. The problem is, virtual box shared folders can get preeeety slow. But, the awesome vagrant guys already dealed with that: http://vagrantup.com/docs/nfs.html. The solution is to use NFS.
Here's my "bechmark" comparing using shared folder, native VM filesystem and NFS.
# Host machine: MacBook Pro, 8GB RAM
# Guest Machine: Ubuntu 10.04 LTS, 750MB RAM
# Putting the Rails app files in the Mac, using VirtuaBox shared folders,
@hugobarauna
hugobarauna / gist:3227490
Created August 1, 2012 14:49
dilbert hubot's script error
2012-08-01T14:39:08+00:00 app[web.1]: [Wed Aug 01 2012 14:39:08 GMT+0000 (UTC)] ERROR Unable to load /app/node_modules/hubot-scripts/src/scripts/dilbert: Error: Cannot find module 'htmlparser'
2012-08-01T14:39:08+00:00 app[web.1]: Error: Cannot find module 'htmlparser'
2012-08-01T14:39:08+00:00 app[web.1]: at Function._resolveFilename (module.js:337:11)
2012-08-01T14:39:08+00:00 app[web.1]: at Function._load (module.js:279:25)
2012-08-01T14:39:08+00:00 app[web.1]: at Module.require (module.js:359:17)
2012-08-01T14:39:08+00:00 app[web.1]: at require (module.js:375:17)
2012-08-01T14:39:08+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/hubot-scripts/src/scripts/dilbert.coffee:4:16)
2012-08-01T14:39:08+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/hubot-scripts/src/scripts/dilbert.coffee:35:4)
2012-08-01T14:39:08+00:00 app[web.1]: at Module._compile (module.js:446:26)
2012-08-01T14:39:08+00:00 app[web.1]: at Object..coffee (/app/node_modules/hubot/node_modu
@hugobarauna
hugobarauna / dabblet.css
Created July 17, 2013 21:27
Simple example os stacking context
/**
* Simple example os stacking context
*/
* {
margin: 0;
}
html {
padding: 20px;
font: 12px/20px Arial, sans-serif;
@hugobarauna
hugobarauna / dabblet.css
Created July 18, 2013 14:21
Stacking context example - broken stacked menus
/**
* Stacking context example - broken stacked menus
*/
div { font: 12px Arial; }
span.bold { font-weight: bold; }
div.lev1 {
width: 250px;
<div></div>
@hugobarauna
hugobarauna / dabblet.css
Created August 23, 2013 13:59 — forked from lucasmazza/dabblet.css
seta com animacao
/**
* seta com animacao
*/
span {
animation: bounce 0.7s infinite ease;
position: relative;
font-size: 3em;
}
# features/step_definitions/search_steps.rb
When /^I search for "([^"]*)"$/ do |search_term|
search_catalogue_with search_term, :using_direct_model_access
end
# features/support/search_support.rb
module SearchSupport
class SearchAutomator