Skip to content

Instantly share code, notes, and snippets.

View lucasmarqs's full-sized avatar

Lucas Marques lucasmarqs

  • Sao Paulo, Brazil
View GitHub Profile
@lucasmarqs
lucasmarqs / sorting_int_vector_by_desc.c
Created March 3, 2016 01:16
Enter a int vector and order it by desc
#include <stdio.h>
#define MAX 100
int defineMaxIndex();
void receiveNumbers(int nums[], int maxIndex);
void descSort(int nums[], int maxIndex);
void printVector(int nums[], int maxIndex);
int main()
@lucasmarqs
lucasmarqs / RSpecHtmlMatcher.rb
Last active January 11, 2016 21:07
Rspec :have_tag matcher
require 'rspec/expectations'
RSpec::Matchers.define :have_tag do |html_tag|
match do |html_string|
@doc = Nokogiri::HTML.fragment(html_string)
@html_tag = html_tag
if @class_names.nil? && @content.nil?
have_html_tag?(html_tag)
elsif @class_names && @content.nil?