This file contains hidden or 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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs mysql | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: unicorn initscript | |
# Description: Unicorn is an HTTP server for Rack application | |
### END INIT INFO |
This file contains hidden or 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
openssl enc -d -aes-256-cbc -in encrypted -k jiji -base64 | |
# -*- coding: utf-8 -*- | |
require 'openssl' | |
require 'base64' | |
text = 'rirakkuma' * 80 * 30000 | |
pass = "jiji" |
This file contains hidden or 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
== app/controllers/weocome_controller.rb == | |
class WelcomeController < ApplicationController | |
include Jpmobile::ViewSelector | |
#hankaku_filter #:input => true | |
hankaku_filter :input => true | |
trans_sid | |
def index | |
end |
This file contains hidden or 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
mkdir -p controller1/admin/test | |
mkdir -p controller2/admin/test | |
mkdir -p controller3/admin/test | |
mkdir -p controller1/user/test | |
mkdir -p controller1/user/mail | |
touch controller1/admin/test/1.txt | |
touch controller1/user/test/1.txt | |
touch controller1/user/mail/1.xml | |
touch controller2/admin/test/2.txt | |
touch controller3/admin/test/3.txt |
This file contains hidden or 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
OpenIdAuthentication.store = OpenID::Store::ActiveRecord.new | |
# | |
# https://github.com/openid/ruby-openid/issues#issue/1 | |
# | |
module OpenID | |
class Consumer | |
class CheckIDRequest | |
def get_message(realm, return_to=nil, immediate=false) | |
if !return_to.nil? |
This file contains hidden or 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 OpenidController < ApplicationController | |
def start | |
identifier = "https://mixi.jp" | |
if using_open_id?(identifier) | |
open_id_authentication(identifier) | |
end | |
end | |
def open_id_authentication(identifier) | |
authenticate_with_open_id(identifier, |
This file contains hidden or 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
test |
This file contains hidden or 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
require 'rubygems' | |
require 'activerecord' | |
ActiveRecord::Base.establish_connection( | |
:adapter => "mysql", | |
:host => "192.168.***.***", | |
:username => "username", | |
:password => "password", | |
:database => "database", | |
:socket => "/var/lib/mysql/mysql.sock", |
NewerOlder