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
//OnReady Ext function | |
Ext.onReady(function(){ | |
//Creating a namespace | |
Ext.ns("Test"); | |
Ext.define("Test.InformationsFormPanel", | |
{ |
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
//Ext on Ready function | |
Ext.onReady(function(){ | |
//Creating a simple form | |
var formPanel = Ext.create('Ext.form.Panel', { | |
title: 'Panel Title', | |
widh:100, | |
height:200, | |
frame:true, | |
defaultType: 'textfield', | |
items: [ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello ExtJS4</title> | |
<!--styles--> | |
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.io/extjs/4.1.0.b1/resources/css/ext-all.css"> | |
<!--extjs 4.0.2--> | |
<script type="text/javascript" charset="utf-8" src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js"></script> | |
<!--app--> | |
<script type="text/javascript"> |
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
# encoding: UTF-8 | |
require 'spec_helper' | |
describe OccurrencesController do | |
context "Show Occurrence" do | |
it "show one occurence" do | |
{ :get => "/events/1/tracks/2/occurrences/3/" }. | |
should route_to( | |
:controller => "occurrences", | |
:action => "show", |
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
#Using ssmtp to send emails in Rails 3 | |
#http://franzejr.wordpress.com/2012/08/02/sending-emails-from-a-ubuntu-server-gmail/ | |
#http://franzejr.wordpress.com/2012/08/03/sending-e-mails-with-sendmail-in-rails-3/ | |
#In your environment.rb | |
ActionMailer::Base.delivery_method = :sendmail | |
ActionMailer::Base.sendmail_settings = { | |
:location => "ssmtp", | |
:arguments => "-i" | |
} |
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
#include <string> | |
#include <vector> | |
#include <iostream> | |
using namespace std; | |
int main(){ | |
char temp[200]; | |
vector<string> strings; |
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
$usuario_senha = file_get_contents("users.txt"); | |
$usuarios = array(); | |
//Lendo linha por linha para pegar os usuarios | |
foreach(preg_split("/((\r?\n)|(\r\n?))/", $usuario_senha) as $line){ | |
//echo $line."<br/>"; | |
$line_it = explode(":", $line); | |
$usuarios[$line_it[0]] = $line_it[1]; | |
} |
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
[21] sharewizz(main)> User.create(id:3989,first_name: "Francisco", last_name:"Lins",terms:true,name:"FranzeJr2", email:"email@gmail.com",password:"password") | |
(0.2ms) BEGIN | |
User Load (14.2ms) SELECT `users`.* FROM `users` WHERE `users`.`email` = 'email@gmail.com' LIMIT 1 | |
User Load (10.5ms) SELECT `users`.* FROM `users` WHERE `users`.`confirmation_token` = '2df949add7a9e970ff949066f5a6b7105fa42a1c19ea7d245cb54b71f5f1eef5' LIMIT 1 | |
SQL (0.9ms) INSERT INTO `users` (`activated`, `authentication_token`, `bio`, `chat_enabled`, `checked_messages_at`, `checked_notifications_at`, `checked_wizzes_at`, `confirmation_sent_at`, `confirmation_token`, `confirmed_at`, `connected`, `created_at`, `current_sign_in_at`, `current_sign_in_ip`, `deleted_at`, `delta`, `email`, `encrypted_password`, `first_name`, `is_admin`, `is_company`, `language`, `last_name`, `last_sign_in_at`, `last_sign_in_ip`, `name`, `nb_objects`, `password_salt`, `picture`, `rating_average`, `remember_created_at`, `reset_password_sent_at`, `reset_ |
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
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
OlderNewer