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
I, [2014-01-29T11:02:52.927394 #25031] INFO -- : Started POST "/users/sign_in" for 70.192.6.44 at 2014-01-29 11:02:52 -0500 | |
I, [2014-01-29T11:02:52.930701 #25031] INFO -- : Processing by Devise::SessionsController#create as HTML | |
I, [2014-01-29T11:02:52.930782 #25031] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"Wbhxw+7q2gPY/v+jIcOpp56Avg2qPnwi+1qfvfIZ6o4=", "user"=>{"email"=>"testuser@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in to Domain"} | |
W, [2014-01-29T11:02:52.931789 #25031] WARN -- : Can't verify CSRF token authenticity | |
I, [2014-01-29T11:02:52.934345 #25031] INFO -- : Completed 422 Unprocessable Entity in 3ms | |
F, [2014-01-29T11:02:52.936751 #25031] FATAL -- : | |
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): | |
actionpack (4.0.2) lib/action_controller/metal/request_forgery_protection.rb:163:in `handle_unverified_request' | |
actionpack (4.0.2) lib/action_controller/metal/request_forgery_protection.rb:170:in `handl |
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
I, [2014-01-29T13:08:51.853592 #30794] INFO -- : Processing by Devise::SessionsController#create as HTML | |
I, [2014-01-29T13:08:51.853726 #30794] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"bY9aBQPKBhetp+jNrl0/WHuN+/jkTzCsW9cGd4kkMDs=", "user"=>{"email"=>"example.user@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in to Bust the Books"} | |
W, [2014-01-29T13:08:51.854607 #30794] WARN -- : Can't verify CSRF token authenticity | |
I, [2014-01-29T13:08:51.871144 #30794] INFO -- : Completed 401 Unauthorized in 17ms |
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
# Track request logging during development | |
around_filter :global_request_logging | |
def global_request_logging | |
logger.info "=> USERAGENT: #{request.headers['HTTP_USER_AGENT']}" | |
logger.info "=> REQUEST_FORMAT: #{request.format}" | |
begin | |
yield | |
ensure | |
logger.info "=> RESPONSE_STATUS: #{response.status}" |
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 AjaxController < ApplicationController | |
skip_authorization_check | |
def ncaa_teams | |
if params[:search] | |
like= "%".concat(params[:search].concat("%")) | |
teams = NcaaTeam.where("name like ?", like) | |
else | |
teams = NcaaTeam.all |
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
gem 'jquery-ui-rails' |
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
10.times do | |
puts "This will be printed 10 times" | |
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
cd C:\ | |
C:\Windows\System32\runas.exe /env /noprofile /user:corp\username "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -command \"start-process powershell_ise -verb RunAs\"" |
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
function con-remote { | |
# Look for a parameter to be sent for the computer name | |
param( | |
# Supply a computer name parameter | |
$name=$(Write-Host "You must specify the computer name as an argument."), | |
# Supply a routine to perform like OST | |
[string]$arg1 | |
) | |
if ($name -ne $null) { | |
if (Test-Connection -Computername $name -BufferSize 16 -Count 1 -Quiet) { |
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 Person | |
def look_around | |
puts "looks around carefully." | |
end | |
def witness_transformation | |
puts "Suddenly, #{@name} transforms into a #{$gender} named #{@new_name} right before your eyes!" | |
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
var = "this is a local variable" | |
@var = "this is an instance variable" | |
@@var = "this is a class variable" | |
$var = "this is a global variable" | |
VAR = "this is a constant" | |
def example_one | |
var = "local" | |
p "Yes this #{var} variable can be accessed here" | |
end |
OlderNewer