class Post < ApplicationRecord
belongs_to :user
end
create_table :photos do |t|
The connection failed because by default psql
connects over UNIX sockets using peer
authentication, that requires the current UNIX user to have the same user name as psql
. So you will have to create the UNIX user postgres
and then login as postgres
or use sudo -u postgres psql database-name
for accessing the database (and psql
should not ask for a password).
If you cannot or do not want to create the UNIX user, like if you just want to connect to your database for ad hoc queries, forcing a socket connection using psql --host=localhost --dbname=database-name --username=postgres
(as pointed out by @meyerson answer) will solve your immediate problem.
But if you intend to force password authentication over Unix sockets instead of the peer method, try changing the following pg_hba.conf
* line:
from
Heroku-18 can not work directly with the gem wicked_pdf[https://github.com/mileszs/wicked_pdf]
To resolve this problem, you need to install libssl1.0.0
to your heroku server.
My old Aptfile
tesseract-ocr
tesseract-ocr-eng
My new Aptfile
-- Select last 5 record which is unique by province_name and order by created_at DESC
#
# Table name: listings
#
# id :uuid not null, primary key
# province_name :string
# province_id :uuid
# created_at :datetime not null
#
Sublime Merge includes a command line tool, smerge
, to work with git, subversion, mercurial projects on the command line. This can be used to open projects in Sublime Merge using the command line.
- Sublime Merge installed in your system within
Applications
folder
Setup
app/sidekiq/recurring_workers/base_job.rb | |
require 'sidekiq/api' | |
class RecurringWorkers::BaseJob | |
include Sidekiq::Job | |
sidekiq_options queue: "recurring_workers", retry: 3, backtrace: true | |
def self.schedule_all |
version: '3.8' | |
services: | |
mongo1: | |
image: mongo:latest | |
container_name: mongo1 | |
restart: always | |
ports: | |
- 27017:27017 | |
environment: |
# /etc/nginx/site-enables/blog.thnkandgrow.com.conf | |
server { | |
# current config | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
# ...other config |
Author: kokorolx
Protect your web applications from malicious exploits. Learn about CSRF and effective prevention strategies.
Cross-Site Request Forgery (CSRF), pronounced "sea surf," is a type of web security vulnerability that allows an attacker to trick a user into performing actions they did not intend to perform on a web application in which they are authenticated. Unlike Cross-Site Scripting (XSS), which exploits the user's trust in a website, CSRF exploits the website's trust in a user. Imagine a scenario where a user is logged into their online banking account. A malicious website could embed a hidden form that, when the user visits the site, automatically submits a request to the banking server to transfer funds to the attacker's account. Since the user is already authenticated, the banking server has no way of knowing the reque
By kokorolx
A comprehensive look at the evolving landscape of Keycloak, its recent updates, potential alternatives, and what the future holds for this open-source Identity and Access Management solution in 2025.
Keycloak has established itself as a leading open-source Identity and Access Management (IAM) solution, providing features like Single Sign-On (SSO), identity brokering, and social login. As we move into 2025, it's crucial to understand how Keycloak is evolving and whether it remains the best choice for your organization's IAM needs. This blog post will delve into the latest changes in Keycloak, explore viable alternatives, and provide an outlook on its future.