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
def create | |
respond_to do |format| | |
resp = { } | |
resp_status = :unprocessable_entity # 422 | |
if (user = OtpAuth::UserAuthenticator.authenticate(params[:email].to_s, params[:password].to_s)) | |
if (profile = OtpAuth::Profile.first_or_create(user_id: user.id)) | |
device = profile.devices.build(push_service_type_id: OtpAuth.get_service_provider_id(params[:push_service_type].to_s.upcase), |
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
[Added Associations] | |
x-scheme-handler/http=exo-web-browser.desktop | |
x-scheme-handler/https=exo-web-browser.desktop | |
image/jpeg=gthumb.desktop; | |
x-scheme-handler/file=exo-file-manager.desktop | |
x-scheme-handler/trash=exo-file-manager.desktop | |
x-scheme-handler/mailto=exo-mail-reader.desktop | |
application/javascript=gvim.desktop; | |
text/plain=gvim.desktop; | |
application/x-wine-extension-inf=gvim.desktop; |
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
package com.example; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.parsers.ParserConfigurationException; | |
import org.w3c.dom.Element; |
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
depth=0 C = TR, ST = Istanbul, L = Istanbul, O = DENIZBANK A.S., OU = DENIZBANK A.S., OU = Terms of use at www.verisign.com/rpa (c)05, CN = inter-vpos.com.tr | |
verify error:num=20:unable to get local issuer certificate | |
verify return:1 | |
depth=0 C = TR, ST = Istanbul, L = Istanbul, O = DENIZBANK A.S., OU = DENIZBANK A.S., OU = Terms of use at www.verisign.com/rpa (c)05, CN = inter-vpos.com.tr | |
verify error:num=27:certificate not trusted | |
verify return:1 | |
depth=0 C = TR, ST = Istanbul, L = Istanbul, O = DENIZBANK A.S., OU = DENIZBANK A.S., OU = Terms of use at www.verisign.com/rpa (c)05, CN = inter-vpos.com.tr | |
verify error:num=21:unable to verify the first certificate | |
verify return:1 | |
CONNECTED(00000003) |
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 ChangeStoreSettingsToLongtext < ActiveRecord::Migration | |
def up | |
change_column :site_configs, :store_settings, :longtext | |
end | |
def down | |
change_column :site_configs, :store_settings, :text | |
end | |
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
change_column :post_translations, :field_name, :text, :limit => 64.kilobytes + 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
# encoding: utf-8 | |
require 'openssl' | |
require "base64" | |
# https://github.com/mdp/rotp | |
require 'rotp' | |
def truncate_hmac(hmac, padded=true) |
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
ActionMailer::Base.delivery_method = :smtp | |
ActionMailer::Base.smtp_settings = { | |
:enable_starttls_auto => true, | |
:port => 587, | |
:address => "mx.yandex.net", | |
:user_name => "test@example.com", | |
:password => "12345", | |
:domain => "example.com", | |
:authentication => :plain | |
} |
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
def save_css_xhr | |
file = @s_site.css_file(:write => true) | |
file.write(params[:code]) | |
file.close | |
respond_to do |format| | |
format.js { } | |
end | |
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
test vim gist |