This file contains 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
attachments: parent_id, asset_id | |
domain_names: organisation_id | |
event_memberships: user_id, event_id | |
events: editor_id | |
group_actions: user_id, group_id | |
groups: user_id | |
icons: parent_id | |
invitations: sender_id | |
legacy_actions: item_upon_id | |
news_items: author_id |
This file contains 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
Feature: API | |
In order to use the service from third party apps | |
As a user | |
I want to be able to use an API | |
Background: | |
Given a user exists # Pickle | |
And I login as the user using basic auth | |
Scenario Outline: Get a ticket |
This file contains 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
$minuit = strtotime("00:00:00.00"); | |
$hora1='00:00:20.00'; | |
$timestamp1 = strtotime($hora1)-$minuit; | |
$hora2='00:00:40.00'; | |
$timestamp2 = strtotime($hora2)-$minuit; | |
$SUMA=$timestamp1+$timestamp2+$minuit; | |
echo date("H:i:s",$SUMA); |
This file contains 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
# /etc/security/limits.conf | |
* soft nofile 999999 | |
* hard nofile 999999 | |
root soft nofile 999999 | |
root hard nofile 999999 | |
=========================================================== | |
# /etc/sysctl.conf | |
# sysctl for maximum tuning |
This file contains 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
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
This file contains 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 jquery | |
#= require jquery_ujs | |
#= require lib/modernizr | |
#= require lib/jquery.lettering | |
#= require_tree . | |
$ -> | |
$('*[data-googlemap]').googleMap() | |
true |
This file contains 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
Key was generated using: | |
tom% openssl genrsa -des3 -out example.com.key 2048 | |
Generating RSA private key, 2048 bit long modulus | |
....+++ | |
..........................................................................................................................+++ | |
e is 65537 (0x10001) | |
Enter pass phrase for example.com.key: | |
Verifying - Enter pass phrase for example.com.key: | |
%tom |
This file contains 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
<!-- app/views/orders/_add_dialog.html.erb --> | |
<div id="add_to_cart_dialog"> | |
Your item(s) have been added. You now have <%= order.item_count %> | |
items valued at <%= number_to_currency order.item_total %> in your cart.<br/> | |
<div id="buttons" style="margin-top: 10px; width: 100%;"> | |
<button id="continue_shopping_button" style="float: left;" type="button">Continue Shopping (10)</button> | |
<button id="view_cart_button" style="margin-left: 10px; float: left;clear: right;" type="button">Checkout Now</button> | |
</div> | |
</div> |
This file contains 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 Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
OlderNewer