Skip to content

Instantly share code, notes, and snippets.

View ricardodovalle's full-sized avatar

Ricardo do Valle ricardodovalle

  • São Paulo, Brazil
View GitHub Profile
#include <QApplication>
#include <QDebug>
void messageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
QByteArray localMsg = msg.toUtf8();
switch (type) {
case QtDebugMsg:
fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
break;
@ricardodovalle
ricardodovalle / QT - Monokai Color Scheme - monokai.xml
Created July 5, 2013 03:44
Color scheme for QT Creator based on Sublime Text 2 default color scheme. Tested on QT Creator v2.7.2.
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Monokai">
<style name="AddedLine" foreground="#3875d7"/>
<style name="RemovedLine" foreground="#ff0000"/>
<style name="Comment" foreground="#808080"/>
<style name="CurrentLine" background="#3e3d32"/>
<style name="CurrentLineNumber" foreground="#a0a19c" background="#3e3d32"/>
<style name="DiffFile" foreground="#a6e22e"/>
<style name="DiffLocation" foreground="#0000ff"/>
<style name="DisabledCode"/>
create_table :manage_relation do |t|
t.references :employee_id
t.references :manager_id
end
create_table :subordinate_relation do |t|
t.references :employee_id
t.references :subordinate_id
end
guard :rspec, :zeus => true, :bundler => false do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb","spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
source 'https://rubygems.org'
ruby '2.0.0'
gem 'bootstrap-sass', '~> 2.3.2.1'
gem 'bootstrap-will_paginate'
gem 'brazilian-rails'
gem 'breadcrumbs_on_rails'
gem 'cancan'
gem 'capistrano'
gem 'client_side_validations'
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
.bs-header
.container
= render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder
@ricardodovalle
ricardodovalle / cards.js.coffee
Last active November 15, 2018 01:22
Rails and jQuery Datatables i18n
jQuery ->
tableContainer = $('#cards_datatable')
tableContainer.dataTable
sDom: "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
sPaginationType: "bootstrap"
bProcessing: true
bServerSide: true
bAutoWidth: false
bStateSave: true
sWrapper: "dataTables_wrapper form-inline"
@ricardodovalle
ricardodovalle / variables.scss
Created November 1, 2013 21:38
PaintStrap variables converted to SCSS.
//
// Variables
// --------------------------------------------------
// Global values
// --------------------------------------------------
// Grays
// -------------------------

Remove rbenv and any rubies, gems etc.:

$ rm -rf ~/.rbenv

Uninstall rbenv if installed via Homebrew

$ brew uninstall rbenv

Remove references to rbenv in ~/.bash_profile etc.