Skip to content

Instantly share code, notes, and snippets.

View heridev's full-sized avatar
🌠
Exploring GraphQL with the Github explorer

Heriberto Magaña heridev

🌠
Exploring GraphQL with the Github explorer
View GitHub Profile
@heridev
heridev / third_part.md
Created August 11, 2018 14:50
Refactoring the app into MVP : Third part - Using Mockito

Seems to be pretty simple to install so now let's start with some examples with the same BooksActivityPresenterTest

BooksActivityPresenterTest.java

import org.junit.Test;
import org.junit.Asserts;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
@heridev
heridev / first_part.md
Last active August 11, 2018 14:46
Refactoring the app into MVP : First part
@heridev
heridev / Unix Command
Last active June 27, 2017 19:14 — forked from vaquarkhan/Unix Command
most common unix command for development
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
#####################################################
@heridev
heridev / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@heridev
heridev / capybara cheat sheet
Last active August 29, 2015 14:07 — forked from zhengjia/capybara cheat sheet
capybara cheat sheets
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@heridev
heridev / gist:5733b5ea01995142f57b
Last active August 29, 2015 14:03
Problema con la api routes
# si deseas utilizar el codigo que adjuntas que es el siguiente
class Api::ResponsesController < ApplicationController
respond_to :json
def index
json_response = {
models: "hola"
}
respond_with json_response
end
@heridev
heridev / a-title-post.md
Last active August 29, 2015 14:03
Rails application or Spree: Uploading images and the Sitemap into amazon AWS
@heridev
heridev / gist:9691733
Last active August 29, 2015 13:57
Problems in spree and rails
uninitialized constant Spree::Core::S3Support
Just remove the two lines from 
app/models/spree/banner_box.rb
-    include Spree::Core::S3Support
-    supports_s3 :attachment
and implement paperclip in the following way:
@heridev
heridev / gist:8985406
Created February 13, 2014 22:39
Probar funcionalidad de api en rails con ajax
Para generar un nuevo token desde la api usamos lo siguiente:
var server = 'http://localhost:3000';
var userAuthUrl = server + '/api/sessions/create?access_token=';
$.ajax({
url: userAuthUrl + access_token,
success: function(resp) {
console.log(resp);
}
@heridev
heridev / gist:8793914
Created February 3, 2014 22:37
Css para bootstrap-glyphicons
[class^="icon-"],
[class*=" icon-"] {
display: inline-block;
/*width: 14px;
height: 14px;*/
width: 32px;
height: 32px;
margin-top: 1px;
margin-right: .3em;
/*line-height: 14px;*/