Skip to content

Instantly share code, notes, and snippets.

View EpicKiwi's full-sized avatar
🥝
Enjoying jucy fruits

EpicKiwi

🥝
Enjoying jucy fruits
View GitHub Profile
@EpicKiwi
EpicKiwi / technic-platform-api.md
Last active May 15, 2019 18:33
Reverse engeneering of the Technic platform API

Technic platform API

This is an attempt of reverse engineer the Technic platform API with a simple Wireshark and an official laucher. This is a simple HTTP based API returning JSON.

Global parameters

URL parameter build is always required to perform a request. The value can be anything but it seems to be a build number of the lauche; maybe for tracking reasons. If this parameters is not present in URL query parameters, all requests will return 401 Unauthorized response.

@EpicKiwi
EpicKiwi / README.md
Created January 15, 2022 17:40
Nginx configuration for couchapp proxying with pretty urls

Couchapp NGINX config

Small nginx configuration in front of couchdb

Features

  • Url rewriting for pretty website hierarchy
  • Basic authentication on private databases

URL rewriting

Importer la bdnb dans Postgres en utilisant la ligne de commande

  1. Installer PostgreSQL
  2. Installer PostGIS pour le support des fonction geographiques
  3. Télécharger les données en .sql
curl --http1.0 -C - "https://bdnb-data.s3.fr-par.scw.cloud/bnb_export_metropole_sql_dump.zip" -o bnb_export_metropole_sql_dump.zip
  1. Extraire le zip
@EpicKiwi
EpicKiwi / wikidata-json-to-ttl.md
Last active September 29, 2022 09:17
A simple 4 lines script to convert JSON-exported `CONSTRUCT` queries from WIKIDATA into Turtle (ttl) file

Wikidata Query to Turtle Conversion

A simple 4 lines script to convert JSON-exported CONSTRUCT queries from WIKIDATA into Turtle (ttl) file

How to use

Build a CONSTRUCT query into Wikidata Query Service and export the result in JSON using the "Download button"

For exemple this query exporting Game Of Thrones Characters

@EpicKiwi
EpicKiwi / unintrusive-ts-rollup.config.js
Last active January 30, 2024 15:30
Rollup config for an Open and Unintrusive Web
// This Rollup config file intend to compile each TypeScript file of
// a source folder without too much modification.
// Goal is to make the resulting code easy to read for beginner, debuggers or curious persons
// wanting to see the full source code.
//
// Typescript targets esnext and doesn't changes too much the resulting files
// Modules are resolved including node_modules compiled into ES Modules
// Original source files are copied to output directory
// Header are added to generated files to hint a visitor about the original file
//
@EpicKiwi
EpicKiwi / install-upcn-linux.md
Last active December 14, 2022 10:05
µPCN Installation procedure for Linux

µPCN Installation procedure for Linux

µPCN is an implementation of the Bundle Protocol in C. This guide describes how to download, compile and install µPCN on Linux.

NOTE This guide use the folder ~ as working directory but any other location is fine. All console prompts will start by # if root access is required and $ if not.

Compile µPCN

@EpicKiwi
EpicKiwi / schemaorg-validate-doc-update.js
Last active January 7, 2023 16:53
Couchdb Design doc to be used on json-ld database with Schema.org
function(newDoc, oldDoc, userCtx){
if(newDoc._id.startsWith("_design/")){
return
}
if(newDoc._deleted){
return;
}
@EpicKiwi
EpicKiwi / webcomponent-ts-rollup.config.js
Created March 4, 2023 12:37
Rollup config for dependancies-included Typescript Webcomponents
import typescript from '@rollup/plugin-typescript';
import commonjs from '@rollup/plugin-commonjs';
import resolve from "@rollup/plugin-node-resolve";
const COMPONENT_NAME = "my-component"
export default {
input: 'src/index.ts',
output: [
{
@EpicKiwi
EpicKiwi / user-personnal-space.conf
Last active June 21, 2023 22:54
NGINX configuration allowing user to create their own personal space under a subdomain with partial DAV support (here under .kiwibox.local)
server {
listen 80;
listen [::]:80;
server_name ~^(?<user>.+)\.kiwibox\.local$;
root /home/$user/$user.kiwibox.local;
try_files $uri $uri/ =404;
client_body_temp_path /tmp/nginx-dav-tmp;