Skip to content

Instantly share code, notes, and snippets.

View apollo13's full-sized avatar

Florian Apolloner apollo13

View GitHub Profile

Keybase proof

I hereby claim:

  • I am apollo13 on github.
  • I am apollo13 (https://keybase.io/apollo13) on keybase.
  • I have a public key whose fingerprint is 4654 4D5B 9683 F7A8 CB69 8D3E 2E0C 8F0C 165D 364C

To claim this, I am signing this object:

{
"name": "conticki",
"dependencies": {
"foundation": "~5.5.0"
},
"apps": {
"conticki": {
"app_concat.js": [
"jquery/dist/jquery.js",
"foundation/js/foundation.js",
id: 1
id: 2
id: 3
id: 4
id: 5
id: 6
id: 7
id: 251
id: 255
------------------------------------------
parseBacktrace: function (backtrace) {
if (!backtrace) {
return null;
}
let result = backtrace.match(/^(.+?)\s*:\s*(\d+)$/);
if (!result || result.length != 3) {
return backtrace;
}
@apollo13
apollo13 / chromelogger.py
Last active May 12, 2022 01:09
Django logging to Firefox/Chrome devtools
"""
License: MIT - https://opensource.org/licenses/MIT
ChromeLogger is a protocol which allows sending logging messages to the Browser.
This module implements simple support for Django. It consists of two components:
* `LoggingMiddleware` which is responsible for sending all log messages
associated with the request to the browser.
* `ChromeLoggerHandler` a python logging handler which collects all messages.
@apollo13
apollo13 / apps.ini
Created August 25, 2018 15:24 — forked from rugginoso/apps.ini
uWSGI Emperor + FastRouter + SubscriptionServer + HTTP + SystemD
[uwsgi]
# Gemeric app
declare-option = app=master=true;socket=/run/uwsgi/$1.sock;chmod-socket=660;vacuum=true;auto-procname=true;procname-prefix-spaced=$1;cheap=true;idle=60ksm=true
# Django
declare-option = django=venv=$1venv;pythonpath=$1;chdir=$1;module=$2.wsgi
# Fastrouter subscription
declare-option = add-domain=subscribe-to=127.0.0.1:12345:$1

Keybase proof

I hereby claim:

  • I am apollo13 on github.
  • I am apollo13 (https://keybase.io/apollo13) on keybase.
  • I have a public key whose fingerprint is 8D32 5B9C 8692 79A8 4ADD E04E 42F3 06A1 CF72 8E71

To claim this, I am signing this object:

@apollo13
apollo13 / pyproject.toml
Last active June 2, 2023 10:13
OwnCloud/NextCloud emulator
[tool.poetry]
name = "owncloudemulator"
version = "0.1.0"
description = ""
authors = ["Florian Apolloner <florian@apolloner.eu>"]
[tool.poetry.dependencies]
python = "^3.7"
starlette = "^0.13.0"
uvicorn = "^0.10.8"
error[E0308]: mismatched types
--> client/src/observer/connector.rs:77:9
|
66 | pub fn update_info(&self) -> std::result::Result<UpdateInfo, Box<dyn error::Error>> {
| ------------------------------------------------------ expected `std::result::Result<observer::connector::UpdateInfo, std::boxed::Box<(dyn std::error::Error + 'static)>>` because of return type
...
77 | / decode::<UpdateInfo>(
78 | | &token,
79 | | &DecodingKey::from_secret("secret".as_ref()),
80 | | &Validation::new(Algorithm::HS256),
## The following connection tries every two seconds to connect to the RW host via 6446
## the cluster contains centos1 - centos3 with centos2 being the current primary
2020-03-06 16:41:50 routing DEBUG [7f88a3fff700] [routing:test_rw] fd=13 connection accepted at 0.0.0.0:6446
2020-03-06 16:41:50 routing DEBUG [7f88b05ff700] [routing:test_rw] fd=13 connected 127.0.0.1:49016 -> centos2:3306 as fd=14
2020-03-06 16:41:51 routing DEBUG [7f88b05ff700] [routing:test_rw] fd=13 connection closed (up: 4453b; down: 880b)
2020-03-06 16:41:53 routing DEBUG [7f88a3fff700] [routing:test_rw] fd=13 connection accepted at 0.0.0.0:6446
2020-03-06 16:41:53 routing DEBUG [7f88b05ff700] [routing:test_rw] fd=13 connected 127.0.0.1:49020 -> centos2:3306 as fd=14
2020-03-06 16:41:53 routing DEBUG [7f88b05ff700] [routing:test_rw] fd=13 connection closed (up: 4453b; down: 880b)
2020-03-06 16:41:55 routing DEBUG [7f88a3fff700] [routing:test_rw] fd=13 connection accepted at 0.0.0.0:6446