Skip to content

Instantly share code, notes, and snippets.

@Neamar
Neamar / seafile-ssl-issue.md
Last active November 4, 2021 10:07
Fix seafile invalid certificate in ssl folder

When restarting seafile, getting the following error:

nginx: [emerg] cannot load certificate "/shared/ssl/XXX.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/shared/ssl/seafile.neamar.fr.crt','r'
) error:2006D080:BIO routines:BIO_new_file:no such file)  

where XXX is server name. According to seafile, this should have been solved automatically.

import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #20
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: Process: fr.neamar.kiss, PID: 12879
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:353)
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:271)
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
04-02 01:10:51.903 10203 12879 1974 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(Thread
"gameCustomizationObjects": [
{
"category": "perks",
"content": "{\r\n \"perkIds\": [\r\n 8437,\r\n 8242,\r\n 8429,\r\n 8453,\r\n 9101,\r\n 9105\r\n ],\r\n \"perkStyle\": 8400,\r\n \"perkSubStyle\": 8000\r\n}"
}
]
@Neamar
Neamar / counters.json
Last active May 21, 2021 16:46
Teamward mock
{
"counters":[
{
"champion":{
"id":"103",
"name":"Ahri",
"patch":"7.21",
"winRate":51.245919783136976,
"gamesCount":124687,
"percentPlayInRole":96.50995386854082,
@Neamar
Neamar / article-1.tex
Last active August 29, 2015 14:15
Exercice du censeur
Comme le dit jadis, par un matin de janvier au début du \century{XX} siècle, monsieur Ernst Zermelo : \quote{Brrr, fait pas chaud aujourd'hui.}
\quote{Mais qu'à cela ne tienne !}, ajouta-t-il avant de s'en retourner gratter derrière son bureau en bois d'acacia\footnote{Cet article ne cite pas suffisamment ses sources.}. Axiomatiser\footnote{21 points au Scrabble} la théorie des ensembles, et par la même occasion toutes les mathématiques, c'est pas une mince affaire. Alors, entre deux complétions, pour se détendre, il travaille sur d'autres "petits" théorèmes. C'est en 1904 qu'il publie une "petite" démonstration, celui du théorème de bon ordre, qui finira par s'appeler théorème de Zermelo\footnote{17 points au Scrabble}.
\begin[Théorème de Zermelo]{quote}
Donne-moi un ensemble, je te définirai un bon ordre. C'est-à-dire que n'importe quel sous-ensemble (non-vide) dudit ensemble contiendra un plus petit élément.
\end{quote}
Ouais, bon, ça a pas l'air comme ça, mais d'une part c'est pas si simple à démontrer
@Neamar
Neamar / gist:874eb3165d37be1a7201
Last active August 29, 2015 14:03
Failing test case for Circle
"use strict";
// USAGE:
// npm install mongoose
// npm install async
// npm install mocha-mongoose
// node test.js
var mochaMongoose = require('mocha-mongoose');
var mongoose = require('mongoose');
$ curl -H "Authorization: token ${TOKEN}" \
https://api.anyfetch.com/documents?search=anyfetch
$ curl -XPOST \
-H "Authorization: token ${TOKEN}" \
-F "file=@sample-file.pdf" \
https://api.anyfetch.com/documents/identifier/hello-world/file
@Neamar
Neamar / gist:75546fa5013209ced625
Last active August 29, 2015 14:01
Send a new document
$ curl -XPOST \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type:application/json" \
https://api.anyfetch.com/documents \
-d '{"identifier": "hello-world", "document_type": "file", "metadatas": {"title": "anyFetch sample file"}}'