#WRT Firmware Link Collections
It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to 127.0.0.1 but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!
localhost
- It will always works. Do you know why? I hope so.[*.]fuf.me
- Managed by @fidian; it will always point to localhost for IPv4 and IPv6[*.]fbi.com
- 👏 👏 👏 👏 👏[*.]localtest.me
[*.]127-0-0-1.org.uk
[*.]vcap.me
import { execSync, spawn, SpawnOptions } from 'child_process' | |
type XCodebuildOptions = { | |
/** | |
* Build the project specified by projectname. | |
* Required if there are multiple project files in the same directory. | |
*/ | |
project: string, | |
/** |
%w(⠾ ⠷ ⠯ ⠟ ⠻ ⠽).cycle { |dot| print "\b#{dot}"; sleep 0.1 } |
# proxying through apache to a local rails instance, http & https | |
# apache *.conf file | |
<VirtualHost *:80> | |
ServerName psl.localhost | |
ServerAlias cms.psl.localhost | |
ServerAlias *.psl.localhost | |
ProxyPass / http://localhost:3000/ | |
ProxyPassReverse / http://localhost:3000/ |
First of all, please note that token expiration and revoking are two different things.
- Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
- Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
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
module Api | |
class NotificationsController < ApiController | |
before_action :authorize_request | |
def index | |
notifications = current_user.notifications.recent | |
json = NotificationSerializer.new(notifications, is_collection: true).serializable_hash | |
render json: json |
import { Injectable } from '@angular/core'; | |
import { BehaviorSubject, Subject } from 'rxjs'; | |
import { PuppiesModule } from './puppies.module'; | |
import { Puppy } from './puppy.model'; | |
@Injectable({ providedIn: PuppiesModule }) | |
export class PuppiesStoreService { | |
// Make _puppiesSource private so it's not accessible from the outside, | |
// expose it as puppies$ observable (read-only) instead. |