opencode auth login
# Select "Kimi For Coding"
# Enter your API key (sk-kimi-...)Here is a simple example for Seafile hosted with Docker in a Compose stack.
For your database network I create it as an --internal network: docker network create --internal your-name-here
Note: Update your email address, volume locations, and password fields
services:
seafile-db:
image: mariadb:10.11I have been using the devise gem with rails to implement user authentication for may applications. When implementing authentication though API requests, then I turn to the devise-jwt gem. I faced an issue when implementing refresh tokens with devise, as devise does not support access tokens. I still needed the superior authentication that devise provides, but needed to manually work with fresh tokens. After looking around the web, here is how I was able to modify the code to implement refresh tokens with devise-jwt.
Take for the example a user model to sore the user email and password.
| #!/bin/bash | |
| # Debug | |
| set -o xtrace | |
| GUEST_IP=192.168.122.221 | |
| HOST_IP=192.168.122.1 | |
| # Wipe the current usbfluxd, usbmuxd, and socat: | |
| sudo killall usbfluxd |
| # Using these pry gems -- copy to your Gemfile | |
| # group :development, :test do | |
| # gem 'awesome_print' # pretty print ruby objects | |
| # gem 'pry' # Console with powerful introspection capabilities | |
| # # pick either: | |
| # # using byebug, but has issues with Zeitwerk | |
| # gem 'pry-byebug' # Integrates pry with byebug | |
| # | |
| # # using default ruby debuggger | |
| # gem 'pry-stack_explorer' |
| class Whereable | |
| def initialize(where:, model: Item, ranking_conditions: [], valid: true, data_source: nil) | |
| @model = model | |
| @where = where | |
| @data_source = data_source | |
| @ranking_conditions = ranking_conditions | |
| @valid = valid | |
| end | |
| def valid? |
| #include <time.h> // Robert Nystrom | |
| #include <stdio.h> // @munificentbob | |
| #include <stdlib.h> // for Ginny | |
| #define r return // 2008-2019 | |
| #define l(a, b, c, d) for (i y=a;y\ | |
| <b; y++) for (int x = c; x < d; x++) | |
| typedef int i;const i H=40;const i W | |
| =80;i m[40][80];i g(i x){r rand()%x; | |
| }void cave(i s){i w=g(10)+5;i h=g(6) | |
| +3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEditor; | |
| public class BuildAutomation { | |
| public struct BuildTargetAndGroup { | |
| public BuildTargetGroup group; | |
| public BuildTarget target; |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
