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
FROM node:22-alpine AS base | |
# Base image for all subsequent stages | |
FROM base AS deps | |
# Install dependencies (libc6-compat is sometimes required) | |
RUN apk add --no-cache libc6-compat | |
WORKDIR /app | |
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ | |
RUN npm install && npm install sharp |
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
#!/usr/bin/env bash | |
# Elementary OS specific: | |
# 1) edit file "/etc/lightdm/io.elementary.greeter.conf" | |
# uncomment line 3 "#default-wallpaper=/usr/share/backgrounds/elementaryos-default" | |
# 2) change symbolic link "/usr/share/backgrounds/elementaryos-default" to "~/windows-spotlight-wp/last.jpg" | |
function checkret | |
{ | |
if [ $1 -ne 0 ]; then |
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
const axios = require('axios'); | |
const { GarminConnect } = require('garmin-connect'); | |
const GCClient = new GarminConnect(); | |
const getExistingActivities = async () => { | |
const existingActivityIds = [] | |
const activities = await axios.get(`${process.env.HOST}/activities`) | |
activities.data.map((activity) => { | |
existingActivityIds.push(activity.activityId) |
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
FROM node:14 AS base | |
# Install dependencies only when needed | |
FROM base AS deps | |
WORKDIR /app | |
# Install dependencies based on the preferred package manager | |
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ | |
RUN npm install |
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
import React, { useState, useEffect, useRef } from 'react'; | |
import { Feature, Map, View } from 'ol'; | |
import TileLayer from 'ol/layer/Tile'; | |
import Overlay from 'ol/Overlay'; | |
import OSM from 'ol/source/OSM'; | |
import {fromLonLat} from 'ol/proj'; | |
import 'ol/ol.css'; | |
import VectorLayer from 'ol/layer/Vector'; | |
import VectorSource from 'ol/source/Vector'; |
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
# Based on https://steveholgado.com/nginx-for-nextjs/ | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=7d use_temp_path=off; | |
upstream nextjs_upstream { | |
server nextjs:3000; | |
keepalive 2; | |
} | |
server { |