[13:14:19][~/Projects/ruby/redmine (master) {jruby-head@redmine}]
$ false
[exited with 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
class User < ActiveRecord::Base | |
devise :database_authenticatable, :openid_authenticatable, :recoverable, :rememberable, :trackable, :validatable | |
# Handle creation of user authenticated via OpenID | |
def self.create_from_identity_url(identity_url) | |
User.new(:identity_url => identity_url) | |
end | |
# Set email as a required field from the Open ID provider |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# If not running interactively, don't do anything | |
#[ -z "$PS1" ] && return | |
if [[ -n "$PS1" ]] ; then | |
# don't put duplicate lines in the history. See bash(1) for more options | |
#export HISTCONTROL=ignoredups | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. |
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
##Prepare the Server | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential | |
apt-get install zlib1g-dev | |
apt-get install uuid-dev | |
##Download, Build, make, make install - Ruby 1.9.2p0 |
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
tcp_syslog is now a gem : | |
https://github.com/tech-angels/tcp_syslog |
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
// Handles JavaScript history management and callbacks. To use, register a | |
// regexp that matches the history hash with its corresponding callback. | |
window.HashHistory = { | |
// The interval at which the window location is polled. | |
URL_CHECK_INTERVAL : 500, | |
// We need to use an iFrame to save history if we're in an old version of IE. | |
USE_IFRAME : jQuery.browser.msie && jQuery.browser.version < 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
# pws has been refactored! See https://github.com/janlelis/pws |
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 ImportedContactsController << ApplicationController | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
#THIS METHOD TO SEND USER TO THE GOOGLE AUTHENTICATION PAGE. | |
def authenticate | |
# initiate authentication w/ gmail | |
# create url with url-encoded params to initiate connection with contacts api | |
# next - The URL of the page that Google should redirect the user to after authentication. | |
# scope - Indicates that the application is requesting a token to access contacts feeds. |
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 Message < ActiveRecord::Base | |
validate :image_size_validation, :if => Proc.new { |m| m.image.present? } | |
mount_uploader :image, MessageImageUploader | |
private | |
def image_size_validation | |
errors[:image] << "should be less than 2MB" if image.size > 2.megabytes | |
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
$.ajaxSetup({ | |
headers: { | |
"X-CSRF-Token": $("meta[name='csrf-token']").attr('content') | |
} | |
}); |
OlderNewer