name: build
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version
This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
This note shows how to iteratively retrieve the decoded content of the pages in a PDF file using Python and the pdfminer
Python package.
At the time of writing, the latest version of
pdfminer
was used, i.e.,20140328
. Thus, as the package seems poorly maintained and prone to API-breaking changes one may have to explicitly install this version for the following code to work.
The following generator will iterate over a PDF file under a given filename
and iteratively yield
the text content of each PDF page:
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
height: 100%; | |
margin: 0; | |
width: 100%; | |
overflow: hidden; | |
} |
func GetFriends(ctx context.Context, user int64) (map[string]*User, error) { | |
g, ctx := errgroup.WithContext(ctx) | |
friendIds := make(chan int64) | |
// Produce | |
g.Go(func() error { | |
defer close(friendIds) | |
for it := GetFriendIds(user); ; { | |
if id, err := it.Next(ctx); err != nil { | |
if err == io.EOF { |
from https://stackoverflow.com/questions/25774999/nginx-stat-failed-13-permission-denied
Nginx operates within the directory, so if you can't cd
to that directory from the nginx user then it will fail (as does the stat
command in your log). Make sure the www-user
can cd
all the way to the /username/test/static
. You can confirm that the stat will fail or succeed by running
sudo -u www-data stat /username/test/static
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
import { useCallback, useEffect, useState } from 'react'; | |
import { useSetRecoilState } from 'recoil'; | |
import { useKeycloak } from '@react-keycloak/web'; | |
import { commonNotification } from './common'; | |
/** | |
* Returns the auth info and some auth strategies. | |
* | |
*/ |
Our incident.io pkg/errors, as explained in: