- $449.99 - Xbox One 500Gb + Kinect + Assassin's Creed Bundle
- $59.99 - Extra controller
- $59.99 - Xbox Live 12 Gold
- $59.99 - Call of Duty: Advanced Warfare
- $59.99 - GTA V
Vantagens: Kinect + Dance Central Spotlight e Assasins Creed Black Flag
# you may think to do this: | |
bar = foo || {} | |
# but foo can and empty string that is not falsy, so you do this: | |
bar = foo.present? ? foo : {} | |
# a better way to do it is this one: | |
bar = foo.presence || {} |
$(document).ready(function() { | |
var typewatch = (function(){ | |
var timer = 0; | |
return function(callback, ms){ | |
clearTimeout (timer); | |
timer = setTimeout(callback, ms); | |
} | |
})(); | |
$('#search-modal').on('input', function () { |
def insert_select2(team_name = nil) | |
# When it simulates an existing record, id is passed, and controller take it by id. | |
# It's simulating Select2 request for getting record on the query. | |
# When name is passed, it indicates that no record was found, creating a new one. | |
# This behavior is implemented on SalespointController#create. | |
execute_script("$('#app-team-modal .select2-focusser').val('#{team_name}').trigger('keyup')"); | |
find('.select2-chosen').click | |
sleep 2 |
# Ajax testing with ruby and capybara | |
# | |
# Add this to spec/support | |
# | |
# When a link or button starts an ajax request, instead of use Capybara | |
# click_link, click_button and click_link_or_button methods use click_ajax_link, | |
# click_ajax_button and click_ajax_link_or_button methods. You can still use | |
# capybara methods and right after it, call wait_for_ajax method. | |
# | |
# This methods will wait until Capybara.default_wait_time for the ajax request |
# This command receives a file as param, upload it to upl.io and copy the url to | |
# the clipboard | |
# | |
# Dependencies: curl and xclip | |
# | |
# Install: copy this code to your .bashrc or .zshrc | |
# | |
# Example: | |
# | |
# $ upload_file ~/Images/algorich-logo.png |
Vantagens: Kinect + Dance Central Spotlight e Assasins Creed Black Flag
//= require bootbox.min | |
// | |
// Open a confirm modal when click in a link. | |
// | |
// Dependencies: JQuery and http://bootboxjs.com | |
// | |
// Usage: | |
// | |
// Add attributes data-confirm-title and data-confirm-message to a link tag or |
class MyArray < Array | |
def initialize(array=[]) | |
super(self.class.ordenar(array)) | |
end | |
# Utilizando o algorítimo quicksort | |
def self.ordenar(array) | |
return array if array.size <=1 | |
pivot = array[0] |
# Verify it a website is back, or the internet access is back. When it is back, | |
# an alarm rings. | |
# | |
# Depends of ticktimer: https://github.com/algorich/ticktimer | |
# | |
# Author: Hugo Maia Vieira <hugomaiavieira@gmail.com> | |
# | |
while : | |
do |
#!/bin/bash | |
# | |
# a2pdf: Script to convert all kind of files in a directory to pdf | |
# | |
# Author: Hugo Maia Vieira <hugomaiavieira@gmail.com> | |
# | |
# Dependencies: tree, cedilla, ps2pdf | |
# | |
# TODO: Separar em funções "concatenar", "converter" e "concatenar e converter" | |
# para poderem ser chamadas separadamente. |