This file contains hidden or 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 '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? |
This file contains hidden or 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
#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() |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct Node { | |
float value; | |
struct Node *next; | |
}; | |
int isNumber(char input[]); |
This file contains hidden or 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
class Admin::ToolsController < AdminController | |
expose :tools, ancestor: :company | |
expose :tool, attributes: :tool_params | |
def create | |
if tool.save | |
set_flash_success_and_redirect_to admin_tools_path | |
else | |
render :new | |
end |
This file contains hidden or 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
Show hidden characters
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
void bubbleSort(int vet[], int len); | |
int main() { | |
srand(time(NULL)); | |
int vet[10]; |
This file contains hidden or 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
fib = Hash.new do |hash, key| | |
if key < 2 | |
hash[key] = key | |
else | |
hash[key] = hash[key-2] + hash[key-1] | |
end | |
end | |
#=> {} | |
fib[3] |
This file contains hidden or 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
[user] | |
name = My name | |
email = [email protected] | |
[alias] | |
a = add | |
ap = add -p | |
can = commit -S --amend --no-edit | |
cm = commit -S -m | |
co = checkout |
This file contains hidden or 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
#------------------------------------------------------------------------------- | |
# POWER ALL THE LINE! | |
# run-shell "powerline-daemon -q" | |
# source "$HOME/workspace/powerline/powerline/bindings/tmux/powerline.conf" | |
# edit configuration | |
bind e new-window -n '~/.tmux.conf' "sh -c '\${EDITOR} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'" | |
#------------------------------------------------------------------------------- | |
# List of plugins |
This file contains hidden or 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
#------------------------------------------------------------------------------- | |
# POWER ALL THE LINE! | |
# run-shell "powerline-daemon -q" | |
# source "$HOME/workspace/powerline/powerline/bindings/tmux/powerline.conf" | |
# edit configuration | |
bind e new-window -n '~/.tmux.conf' "sh -c '\${EDITOR} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'" | |
#------------------------------------------------------------------------------- | |
# List of plugins |
OlderNewer