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
<html> | |
<head> | |
<meta charset=utf-8" /> | |
<title><?php if(isset($title)) echo $title; else echo 'SuperPI';?></title> | |
<link rel="stylesheet" type="text/css" href="../jquery-file-upload/css/jquery.fileupload-ui.css" /> | |
<script type="text/javascript" src="https//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script type="text/javascript" src="../jquery-file-upload/js/vendor/jquery.ui.widget.js"></script> | |
<script type="text/javascript" src="../jquery-file-upload/js/jquery.iframe-transport.js"></script> | |
<script type="text/javascript" src="../jquery-file-upload/js/jquery.fileupload.js"></script> |
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
<?php | |
class Bd_manager_doctrine extends CI_Controller{ | |
public $entities = ''; | |
public function __construct(){ | |
require_once "/../models/Entities/Admin.php"; | |
require_once "/../models/Entities/Log.php"; | |
require_once "/../models/Entities/Usuario.php"; |
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
<?php | |
use Doctrine\ORM\Tools\Setup; | |
use Doctrine\ORM\EntityManager; | |
require_once "classes/Admin.php"; | |
require_once "classes/Log.php"; | |
require_once "classes/Usuario.php"; | |
require_once "classes/PremiosUsuario.php"; | |
require_once "classes/Aposta.php"; |
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
# Database config shared in Capistrano 3: .../shared/config/database.yml | |
# MySQL. Versions 5.0+ are recommended. | |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# |
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
#!/bin/bash | |
# Autor: Daniel Alvarenga Lima <danielalvarengalima@gmail.com> | |
# Versão do Ubuntu suportada: 14.10 64Bit | |
# Versão deste Script: 2015-05-20 | |
# EXECUTE | |
# sudo chmod +x script-install-all-ubuntu.sh | |
# ./script-install-all-ubuntu.sh |
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
$ bundle exec sidekiq | |
2015-07-24T14:51:37.763Z 5115 TID-8n3is INFO: Booting Sidekiq 3.4.2 with redis options {:url=>"redis://localhost:6379/12", :db=>1, :namespace=>"superofertas"} | |
[WARNING] You are not setting Devise.secret_key within your application! | |
You must set this in config/initializers/devise.rb. Here's an example: | |
Devise.secret_key = "1f6cfe65c936664f0d9c5b49b9f4cf5cc86cf400e9fee6582d82eb7620dbdf0a551b99de883c0a6540fb08656251968085ed" | |
Instance method "open" is already defined in Object, use generic helper instead or set StateMachines::Machine.ignore_method_conflicts = true. | |
Cannot define multiple 'included' blocks for a Concern | |
/home/dev/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.2/lib/active_support/concern.rb:126:in `included' | |
/home/dev/.rvm/gems/ruby-2.2.2/bundler/gems/spree-222ae3a9dfa9/core/app/models/spree/order/checkout.rb:6:in `<module:Checkout>' |
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
Adicionar JQuery ao console | |
javascript:if(!window.jQuery||confirm('Overwrite\x20current\x20version?\x20v'+jQuery.fn.jquery))(function(d,s){s=d.createElement('script');s.src='https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js';(d.head||d.documentElement).appendChild(s)})(document); | |
Chamada AJAX | |
$.ajax({ | |
headers: { | |
"Accept": "application/json; charset=utf-8", | |
"Content-Type": "application/json; charset=utf-8", |
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
before_filter :allow_cors | |
def allow_cors | |
headers["Access-Control-Allow-Origin"] = "*" | |
headers["Access-Control-Allow-Methods"] = %w{GET POST PUT DELETE OPTIONS}.join(",") | |
headers["Access-Control-Allow-Headers"] = %w{Origin Accept Content-Type X-Requested-With X-Prototype-Version X-CSRF-Token token}.join(",") | |
headers['Access-Control-Max-Age'] = "1728000" | |
if request.method == 'OPTIONS' | |
render :text => '', :content_type => 'text/plain' | |
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
# Add in ~/.bashrc or ~/.bash_profile | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
RED="\[\033[01;31m\]" | |
YELLOW="\[\033[01;33m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" | |
NO_COLOR="\[\033[00m\]" |
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
[user] | |
name = Daniel Alvarenga | |
email = danielalvarengalima@gmail.com | |
[core] | |
editor = vim -f | |
[alias] | |
df = diff | |
st = status | |
ci = commit | |
co = checkout |
OlderNewer