Skip to content

Instantly share code, notes, and snippets.


Marc-André Dufresne MarcDufresne

View GitHub Profile
MarcDufresne /
Created Mar 3, 2021
Python Memory Snapshot Profiler
def profile(message: str = "Snapshot"):
padding_len = max(99 - len(message), 0)
print(f"{message} {'*' * padding_len}")
import pandas
from pympler import muppy, summary
all_objects = muppy.get_objects()
sum1 = summary.summarize(all_objects)
# Prints out a summary of the large objects
MarcDufresne / Dockerfile
Created Dec 14, 2020
Kong Custom Plugin Image
View Dockerfile
FROM kong:2.2
USER root
RUN luarocks install kong-auth-request
USER kong
MarcDufresne / docker-compose.yaml
Created Nov 6, 2020
Teslamate Docker Compose
View docker-compose.yaml
version: "3"
image: teslamate/teslamate:latest
restart: always
- database
View active_hours_task.ps1
MarcDufresne / d2_solo.ps1
Created Sep 3, 2019
Destiny 2 Solo Mode
View d2_solo.ps1
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
New-NetFirewallRule -DisplayName "Destiny2-Solo-1" -Direction Outbound -LocalPort 1935,3097,3478-3480 -Protocol TCP -Action Block
New-NetFirewallRule -DisplayName "Destiny2-Solo-2" -Direction Outbound -LocalPort 1935,3097,3478-3480 -Protocol UDP -Action Block
New-NetFirewallRule -DisplayName "Destiny2-Solo-3" -Direction Inbound -LocalPort 1935,3097,3478-3480 -Protocol TCP -Action Block
New-NetFirewallRule -DisplayName "Destiny2-Solo-4" -Direction Inbound -LocalPort 1935,3097,3478-3480 -Protocol UDP -Action Block
Write-Host "Destiny 2 Solo mode activated. Press any key to deactivate solo mode."
MarcDufresne /
Last active Feb 20, 2018
[ANN][M0RK] m0rkcoin - Open-Source and Quality focus - NO PREMINE/NO ICO
[b]About m0rkcoin[/b]
m0rkcoin is a fork of ByteCoin and has a strong focus on privacy and anonymity, with features like:
[li]Untraceable payments[/li]
[li]Unlinkable transactions[/li]
[li]Double-spending proof[/li]
m0rkcoin focuses on open-source, community, quality and ease of use. We will release all software we create as open-source with permissive license, pull requests, suggestions and feedback is welcome. We aim to create quality apps built on top of modern technology stacks.
MarcDufresne /
Created Jan 12, 2018
m0rkcoind seed node setup

DigitalOcean Ubuntu


In /root/:

apt-get update && apt-get install -y supervisor
chmod +x m0rkcoind

Keybase proof

I hereby claim:

  • I am marcdufresne on github.
  • I am madx23 ( on keybase.
  • I have a public key whose fingerprint is CE5C EC33 05B3 764E 71EF 0D8A 7FD1 3DFD 4B20 B057

To claim this, I am signing this object:

MarcDufresne /
Created May 14, 2015
Kind of TransMeta Mongo/Flask
def get_fieldname(field, lang):
return "{}_{}".format(field, lang)
def safe_get_value(field):
def get_value(self):
field_name = lambda x: get_fieldname(field, x)
MarcDufresne /
Last active Aug 21, 2020
Custom XML Feed in Django
# -*- coding: utf-8 -*-
Custom Django Feed
from django.contrib.syndication.views import Feed
from django.utils.feedgenerator import SyndicationFeed
from django.utils.xmlutils import SimplerXMLGenerator
class CustomSyndicationFeed(SyndicationFeed):