Skip to content

Instantly share code, notes, and snippets.

View meoooh's full-sized avatar

han meoooh

  • 뉴비 주식회사
View GitHub Profile
class RightDoor(object):
def right_open(self):
print "RightDoor open complete"
self.beep()
class LeftDoor(object):
def left_open(self):
print "LeftDoor open complete"
self.beep()
class CommentsController < ApplicationController
before_action :set_commentable
before_action :set_comment, only: [:show, :update, :destroy]
before_filter :authenticate_user!
def index
obj = {}
params[:page] = (params[:page].to_i.is_a? Integer) ? (params[:page].to_i > 0 ? params[:page].to_i : 1) : 1
{
"comments": [
{
"id": 1,
"writer_id": 1,
"content": "test",
"commentable_id": 1,
"commentable_type": "Bookkeeping",
"created_at": "2013-11-11T14:50:10.085+09:00",
"updated_at": "2013-11-11T14:50:10.085+09:00"
Started POST "/users/sign_in.json" for 112.175.135.112 at 2013-11-01 07:31:50 +0000
Processing by Users::SessionsController#create as JSON
Parameters: {"email"=>"tester1@bbapi.com", "password"=>"12341234", "session"=>{"email"=>"tester1@bbapi.com", "password"=>"12341234"}}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'tester1@bbapi.com' LIMIT 1
CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'tester1@bbapi.com' LIMIT 1
Completed 500 Internal Server Error in 4ms
NoMethodError (undefined method `valid_password?' for nil:NilClass):
app/controllers/users/sessions_controller.rb:9:in `create'
function twinkle(target){
var opa = $(target).css("opacity");
if(twinkleSwitch){
$(target).css("opacity", parseFloat(opa) - 0.1);
if($(target).css("opacity") < 0.1){
twinkleSwitch = false;
}
}
$ ./manage.py shell
/home/vom/.virtualenvs/vom/local/lib/python2.7/site-packages/IPython/terminal/embed.py:254: DeprecationWarning: With-statements now directly support multiple context managers
with nested(self.builtin_trap, self.display_trap):
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
class Test(models.Model):
s = models.BooleanField()
class TestForm(ModelForm):
class Meta:
model = Test
####
------------------------------------------------------------
/home/meoooh/.virtualenvs/myCrm/bin/pip run on Fri Sep 27 00:54:51 2013
Downloading/unpacking django
Getting page https://pypi.python.org/simple/django/
URLs to search for versions for django:
* https://pypi.python.org/simple/django/
Analyzing links from page https://pypi.python.org/simple/Django/
Skipping link https://pypi.python.org/packages/any/D/Django/Django-1.5.2-py2.py3-none-any.whl#md5=07f0d2d42162945d0ad031fc9737847d (from https://pypi.python.org/simple/Django/); unknown archive format: .whl
Found link https://pypi.python.org/packages/source/D/Django/Django-1.1.3.tar.gz#md5=52848c23dbc120fe0b2a8e7189b20306 (from https://pypi.python.org/simple/Django/), version: 1.1.3
------------------------------------------------------------
/home/meoooh/.virtualenvs/myCrm/bin/pip run on Fri Sep 27 00:54:51 2013
Downloading/unpacking django
Getting page https://pypi.python.org/simple/django/
URLs to search for versions for django:
* https://pypi.python.org/simple/django/
Analyzing links from page https://pypi.python.org/simple/Django/
Skipping link https://pypi.python.org/packages/any/D/Django/Django-1.5.2-py2.py3-none-any.whl#md5=07f0d2d42162945d0ad031fc9737847d (from https://pypi.python.org/simple/Django/); unknown archive format: .whl
Found link https://pypi.python.org/packages/source/D/Django/Django-1.1.3.tar.gz#md5=52848c23dbc120fe0b2a8e7189b20306 (from https://pypi.python.org/simple/Django/), version: 1.1.3
meoooh@vm-3:~/rails/fpage$ bundle
Using rake (10.1.0) 
Using i18n (0.6.5) 
Using minitest (4.7.5) 
Using multi_json (1.8.0) 
Using atomic (1.1.14) 
Using thread_safe (0.1.3) 
Using tzinfo (0.3.37) 
Using activesupport (4.0.0) 
Using builder (3.1.4)