Access Oracle Cloud VM from any browser on any devices
wget -O vscode.deb https://code.visualstudio.com/sha/download\?build\=stable\&os\=linux-deb-arm64 && sudo apt install ./vscode.deb --fix-broken -y && rm vscode.deb
Access Oracle Cloud VM from any browser on any devices
wget -O vscode.deb https://code.visualstudio.com/sha/download\?build\=stable\&os\=linux-deb-arm64 && sudo apt install ./vscode.deb --fix-broken -y && rm vscode.deb
Access Oracle Cloud VM from any browser on any devices
wget -O vscode.deb https://code.visualstudio.com/sha/download\?build\=stable\&os\=linux-deb-arm64 && sudo apt install ./vscode.deb --fix-broken -y && rm vscode.deb
#https://deanpcmad.com/2024/installing-older-ruby-versions-on-ubuntu-24-04-and-22-04/ | |
rvm get head | |
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz | |
tar zxvf openssl-1.1.1g.tar.gz | |
cd openssl-1.1.1g | |
./config --prefix=$HOME/.openssl/openssl-1.1.1g --openssldir=$HOME/.openssl/openssl-1.1.1g |
Increase live Ubuntu server disk space (requires LVM) without any downtime.
All of the commands below need to be executed as root
user.
Create a new partition using unallocated space.
First we'll need to determine exactly which disk was added or had its size increased.
Feature: Facebook Connect | |
Scenario: Sign in with Facebook | |
When I go to the sign in page | |
And I press "Sign in with Facebook" | |
And Facebook returns uid:"123", nickname:"chunky.bacon", first_name:"Chunky", last_name:"Bacon", email:"[email protected]" | |
Then I should see "Your mysite account was successfully created" |
... | |
gem 'devise', | |
:git => 'https://github.com/plataformatec/devise.git', | |
:branch => 'omniauth' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
... |
# in spec/support/omniauth_macros.rb | |
module OmniauthMacros | |
def mock_auth_hash | |
# The mock_auth configuration allows you to set per-provider (or default) | |
# authentication hashes to return during integration testing. | |
OmniAuth.config.mock_auth[:twitter] = { | |
'provider' => 'twitter', | |
'uid' => '123545', | |
'user_info' => { | |
'name' => 'mockuser', |
module Devise | |
module Models | |
# Registerable is responsible for everything related to registering a new | |
# resource (ie user sign up). | |
module Registerable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# A convenience method that receives both parameters and session to | |
# initialize a user. This can be used by OAuth, for example, to send |
# Define a "warnings" validation bucket on ActiveRecord objects. | |
# | |
# @example | |
# | |
# class MyObject < ActiveRecord::Base | |
# warning do |vehicle_asset| | |
# unless vehicle_asset.description == 'bob' | |
# vehicle_asset.warnings.add(:description, "should be 'bob'") | |
# end | |
# end |
# requires :password_reset_token and :password_reset_token_expires_at fields | |
module PasswordResetable | |
extend ActiveSupport::Concern | |
included do | |
before_validation do | |
if password_reset_token_expires_at && password_reset_expires_at.past? | |
expire_password_reset! | |
end | |
end |