Skip to content

Instantly share code, notes, and snippets.

View fusetim's full-sized avatar

FuseTim fusetim

  • TELECOM Nancy
  • France
View GitHub Profile
@fusetim
fusetim / Caddyfile
Last active June 6, 2020 13:43
Openrc service description for Caddy2 (caddyserver)
*:80
respond "Hello, world!"
@fusetim
fusetim / Main.scala
Created August 13, 2020 14:33
G13-Chroma
package fr.fusetim.g13-chroma;
import java.io.File
import java.io.PrintWriter
object Main extends App {
println("Hello world!")
val colors = (0, 1.0, 1.0) #:: ((120,1.0,1.0) #:: ((240,1.0,1.0) #:: chroma(0,0.9,1.0)));
val file = new File("/run/g13d/g13-0")
@fusetim
fusetim / Dockerfile
Created November 1, 2020 17:16
Dockerfile for PronoteAPI
FROM node:buster-slim
# Setup working dir
WORKDIR /usr/src/app
# Install deps
COPY package* ./
RUN npm install -d
# Copy app
@fusetim
fusetim / Dockerfile
Last active December 24, 2020 11:56
Dockerfile for RTDBin
FROM --platform=$TARGETPLATFORM python:3.8-slim-buster
ENTRYPOINT python -m bin
WORKDIR /usr/local/lib/rtd-bin
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
# Install prerequisities
@fusetim
fusetim / Dockerfile
Last active December 5, 2020 15:05
Dockerfile for ReadTheBin (RTD's bot for pasting bins)
FROM node:buster-slim
# Setup working dir
WORKDIR /usr/src/app
RUN mkdir /config
# Install deps
RUN npm install pm2 -g
# Copy app
@fusetim
fusetim / Dockerfile
Created January 20, 2021 17:20
Dockerfile for Zola (https://getzola.org)
FROM rust:slim AS builder
RUN apt-get update -y && \
apt-get install -y python-pip make g++ python-setuptools libssl-dev pkg-config rsync && \
pip install dockerize && \
rustup target add x86_64-unknown-linux-gnu
WORKDIR /app
COPY . .
@fusetim
fusetim / main.rs
Created April 12, 2021 08:54
Converting Greek source text to LaTeX source text (using babel mapping)
use std::collections::HashMap;
macro_rules! collection {
// map-like
($($k:expr => $v:expr),* $(,)?) => {
std::iter::Iterator::collect(std::array::IntoIter::new([$(($k, $v),)*]))
};
// set-like
($($v:expr),* $(,)?) => {
std::iter::Iterator::collect(std::array::IntoIter::new([$($v,)*]))
@fusetim
fusetim / ipfs.log
Created May 10, 2021 17:33
IPFS log report
error setting log levels: unrecognized level: "verbose"
Initializing daemon...
go-ipfs version: 0.8.0-ce693d7e8
Repo version: 11
System version: amd64/linux
Golang version: go1.16.2
2021-05-10T19:15:30.494+0200 INFO dht/RtRefreshManager starting refreshing cpl 0 with key CIQAAACT3UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA (routing table size was 0)
2021-05-10T19:15:30.494+0200 WARN dht/RtRefreshManager failed when refreshing routing table2 errors occurred:
* failed to query for self, err=failed to find any peer in table
* failed to refresh cpl=0, err=failed to find any peer in table
@fusetim
fusetim / config_ipfs_pc.json
Created May 11, 2021 16:01
IPFS config from my PC node (go-ipfs 0.8.0 on amd64)
{
"API": {
"HTTPHeaders": {
"Access-Control-Allow-Methods": [
"PUT",
"POST"
],
"Access-Control-Allow-Origin": [
"http://webui.ipfs.io.ipns.localhost:8080",
"http://localhost:3000",
@fusetim
fusetim / ipfs_config.json
Created May 11, 2021 16:06
IPFS Config from my working node (go-ipfs 0.8.0 on arm64)
{
"API": {
"HTTPHeaders": {
"Access-Control-Allow-Origin": [
"*"
]
}
},
"Addresses": {
"API": [