Skip to content

Instantly share code, notes, and snippets.

├── .github ├── gantt-logo.jpg ├── hero-image.png └── workflows │ └── publish.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.json ├── README.md ├── builder

How to enable embedded Superset dashboards in React/Next.js with CSV exporing

Permissions settings on Gamma role:

For Gamma role:

  • can read on EmbeddedDashboard
  • can export on Chart
  • can export on Dashboard
  • can csv on Superset
  • can this form get on CsvToDatabaseView
  • can this form post on CsvToDatabaseView (probably not required but I have it set)
@redanium
redanium / medusa-config.js
Created December 18, 2023 16:54 — forked from vladimirpekez/medusa-config.js
Medusa config /backend/medusa-config.js
const dotenv = require("dotenv");
let ENV_FILE_NAME = "";
switch (process.env.NODE_ENV) {
case "production":
ENV_FILE_NAME = ".env.production";
break;
case "staging":
ENV_FILE_NAME = ".env.staging";
break;
@redanium
redanium / graph_models.md
Created November 4, 2022 01:30 — forked from rg3915/graph_models.md
Generate graphic model Django with PyGraphViz pygraphviz pydot generate model graph model 2020

How to generate graphic model Django with PyGraphViz?

sudo apt-get install -y graphviz libgraphviz-dev pkg-config
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install pygraphviz
pip uninstall pyparsing
pip install -Iv https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709
@redanium
redanium / ideviceforward
Created October 21, 2022 01:25 — forked from gabrc52/ideviceforward
Forward iOS device from host to guest (OSX-KVM)
#!/bin/bash
# Debug
set -o xtrace
GUEST_IP=192.168.122.221
HOST_IP=192.168.122.1
# Wipe the current usbfluxd, usbmuxd, and socat:
sudo killall usbfluxd
@redanium
redanium / bluetooth_serial.md
Created September 19, 2022 22:26 — forked from 0/bluetooth_serial.md
Connecting a Bluetooth device for serial communication on Arch Linux.

The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.

Prerequisites

The following packages are required:

  • bluez: bluetoothd
  • bluez-utils: bluetoothctl, rfcomm
// show pdf in the editor
// pdf is uploaded using the video/media button
// then its tag is converted from video to pdf at beforeSetContent
tinymce.init({
selector: 'textarea#Description',
plugins: 'print preview fullpage paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons ',
menubar: 'file edit view insert format tools table help',
@redanium
redanium / fields.py
Created March 27, 2022 02:16 — forked from yprez/fields.py
Django rest framework - Base64 image field
import base64
from django.core.files.base import ContentFile
from rest_framework import serializers
class Base64ImageField(serializers.ImageField):
def from_native(self, data):
if isinstance(data, basestring) and data.startswith('data:image'):
# base64 encoded image - decode
@redanium
redanium / Huawei WWAN.md
Created February 22, 2022 08:37 — forked from jfstenuit/Huawei WWAN.md
Using a Huawei WWAN dongle on Linux

Introduction

Installing Huawei E3531 Surf Stick on Linux

May be a valuable insight for more modern surf sticks like Huawei E8231 and the likes ...

Linux is currently Ubuntu, Debian or Raspbian should be similar

The problem

This Huawei Surf stick has several USB mode. It appears first as CD-ROM-like device, so that Windows users can install their driver, then switches mode to appear as "something else". By defaut, this is a network card (virtually connected to a router),

@redanium
redanium / WiX service installation
Created February 9, 2022 20:13 — forked from rowlandwatkins/WiX service installation
WiX Service Installation
http://plainoldstan.blogspot.hk/2010/11/wix-installing-and-uninstalling-windows.html:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="9c78f041-c29e-4d80-8d23-e4839e74038c" Name="StansApp"
Language="1033" Version="1.0.0.0"
Manufacturer="Standa" UpgradeCode="b1adfc21-927f-470a-ac87-a5019c84a253">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">