POST /oauth/token HTTP/1.1
Content-Type: application/json
{
"grant_type": "password",
"client_id": "CLIENT_ID",
"owner_type": "OWNER_TYPE",
"username": "OWNER_EMAIL",
"password": "OWNER_PASSWORD"
Stream audio to any Sonos component via AirPlay using a Raspberry Pi (Model B, Raspbian Jessie) and the following software:
- Shairport Sync: configures the Raspberry Pi as an AirPlay audio player.
- DarkIce: encodes audio received from AirPlay (system audio) and sends it to Icecast2.
- Icecast2: serves streaming audio from DarkIce at a network URL.
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/bash | |
# rake db:migrate tries to connect to dump local postgres using pg_dump but | |
# you are using a docker instance? try saving this script as pg_dump somewhere | |
# in your PATH with higher priority | |
orig_params="$@" | |
volmount="" | |
while [[ $# -gt 1 ]] | |
do |
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
int doubler(int x) { | |
return 2 * x; | |
} |
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:
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
# implementation from https://github.com/rails/rails/pull/16919 | |
# activerecord/lib/active_record/connection_adapters/postgresql/oid/interval.rb | |
require "active_support/duration" | |
module ActiveRecord | |
module ConnectionAdapters | |
module PostgreSQL |
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
Serial Keys: | |
YV54A-2ZW5P-M887Y-UWXNE-QPUXD | |
VY3R2-0NW0L-H845Q-TDMXT-XQAT0 | |
VC7JR-A0Z97-08EGZ-M4YNV-XVHD0 | |
FC1TU-4RGEQ-084EP-2XQQX-ZGHWA | |
CU1WA-8HGEN-M815Z-HQP5E-QKADF | |
AY7D0-FTG44-H846Y-2XPGV-P32T8 | |
If i request you to be my mentor, what will you teach? comment below. |