Skip to content

Instantly share code, notes, and snippets.

View addamh's full-sized avatar

Addam Hardy addamh

View GitHub Profile
@addamh
addamh / gist:708372
Created November 21, 2010 02:12
ssh debug output for addamh on libernil
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to libernil.org [69.164.201.146] port 1001.
debug1: Connection established.
debug1: identity file /Users/addam/.ssh/identity type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug2: key_type_from_name: unknown key type '-----END'
def GetSubscriptionStatus(auth,refId,subscriptionId)
x = Builder::XmlMarkup.new(:target=>@xmlout)
x.instruct! :xml, :version => "1.0", :encoding => "US-ASCII"
x.ARBGetSubscriptionStatusRequest("xmlns" =>"AnetApi/xml/v1/schema/AnetApiSchema.xsd") {
x.merchantAuthentication {
x.name auth.name
x.transactionKey auth.transactionKey
def GetSubscriptionStatus(auth,refId,subscriptionId)
x = Builder::XmlMarkup.new(:target=>@xmlout)
x.instruct! :xml, :version => "1.0", :encoding => "US-ASCII"
x.ARBGetSubscriptionStatusRequest("xmlns" =>"AnetApi/xml/v1/schema/AnetApiSchema.xsd") {
x.merchantAuthentication {
x.name auth.name
x.transactionKey auth.transactionKey
#include <iostream>
#include <cstdlib>
#include <string>
#include <ncurses.h>
#define WIDTH 30
#define HEIGHT 10
int startx = 0;
int starty = 0;
char *drinkChoices[] = {
#include <iostream>
#include <cstdlib>
#include <string>
#include <ncurses.h>
#define WIDTH 30
#define HEIGHT 10
int startx = 0;
int starty = 0;
int insertedChange = 0;
class PagesController < ApplicationController
def home
@title = "Home"
end
def crew
@title = "Crew"
end
def contact
addam@Hera:/Volumes/3pipe.org/ThreePipe (master): $> cap deploy
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote [email protected]:addamh/3Pipe-Site.git master"
* executing "git clone -q [email protected]:addamh/3Pipe-Site.git /rails-dev/ThreePipe/releases/20110228152249 && cd /rails-dev/ThreePipe/releases/20110228152249 && git checkout -q -b deploy 23264e344c9b8b60c62bba842d6e836db4087afb && (echo 23264e344c9b8b60c62bba842d6e836db4087afb > /rails-dev/ThreePipe/releases/20110228152249/REVISION)"
servers: ["3pipe.org"]
Password:
[3pipe.org] executing command
** transaction: commit
* executing `deploy:restart'
[DEPRECATED] `deploy:restart` is going to be changed to Passenger mod_rails' method after 2.5.9 - see http://is.gd/2BPeA
* executing "sudo -p 'sudo password: ' -u app /opt/rails-dev/ThreePipe/current/script/process/reaper"
servers: ["3pipe.org"]
[3pipe.org] executing command
** [out :: 3pipe.org] sudo: unknown user: app
command finished
failed: "env PATH=/usr/local/rvm/gems/ruby-1.9.2-p136/bin:/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin:/usr/local/rvm/rubies/ruby-1.9.2-p136/bin:/usr/local/rvm/bin:/usr/local/bin:/usr/bin:/bin RUBY_VERSION=ruby-1.9.2-p136 GEM_HOME=/usr/local/rvm/gems/ruby-1.9.2-p136 GEM_PATH=/usr/local/rvm/gems/ruby-1.9.2-p136:/usr/local/rvm/gems/ruby-1.9.2-p136@global BUNDLE_PATH=/usr/local/rvm/gems/ruby-1.9.2-p136 MY_RUBY_HOME=/usr/local/rvm/rubies/ruby-1.9.2-p136 RAILS_ENV=production sh -c 'sudo -p '\\''sudo password: '\\'' -u app /opt/rails-dev/ThreePipe/current/script/process/reaper'" on 3pipe.org
ruby-1.9.2-p136 :004 > User.new(:username => 'addamh', :email => '[email protected]', :password => 'temp')
=> #<User id: nil, username: nil, email: "[email protected]", encrypted_password: "$2a$10$UGt16NYX/NltywLXqOHqzOgSq9uAAhjznZtp8hf3tWiU...", password_salt: "$2a$10$UGt16NYX/NltywLXqOHqzO", sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: nil, updated_at: nil>
ruby-1.9.2-p136 :005 > e = _
=> #<User id: nil, username: nil, email: "[email protected]", encrypted_password: "$2a$10$UGt16NYX/NltywLXqOHqzOgSq9uAAhjznZtp8hf3tWiU...", password_salt: "$2a$10$UGt16NYX/NltywLXqOHqzO", sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: nil, updated_at: nil>
ruby-1.9.2-p136 :006 > e.save
=> false
class StudentsController < ApplicationController
respond_to :html, :xml, :json
expose(:students) { User.where(:role => :student) }
expose(:student)
def new
student.role = 'student'
student.build_profile
end