Skip to content

Instantly share code, notes, and snippets.

View smallstepman's full-sized avatar
🦀

Marcin Nowak-Liebiediew smallstepman

🦀
  • Switzerland
  • 12:20 (UTC +01:00)
View GitHub Profile
var default_value = 5;

const modalForm = app.plugins.plugins.modalforms.api;
const result = await modalForm.openForm({
  title: "Assessment Form",
  fields: [
    {
      name: "appearance_rate",
      label: "BODY: Appearance Rate (1-10)",
  graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
@smallstepman
smallstepman / NightLionV2.js
Created September 25, 2023 00:32
Blink iOS theme
t.prefs_.set('color-palette-overrides',["#4c4c4c", "#bb0000", "#5fde8f", "#f3f167", "#276bd8", "#bb00bb", "#00dadf", "#bbbbbb", "#555555", "#ff5555", "#55ff55", "#ffff55", "#5555ff", "#ff55ff", "#55ffff", "#ffffff"]);
t.prefs_.set('foreground-color', "#ffffff");
t.prefs_.set('background-color', "#000000");
t.prefs_.set('cursor-color', 'rgba(187,187,187,0.5)');
{
"0.12": {
"sns": {
"downloadUrl": "https://github.com/foo/bar"
}
},
"0.13": {
"sns": {
"downloadUrl": "https://github.com/foo/bar"
},
  • from_host and from_path are conditional fields
    • if request_host contains from_host, we will replace it's value with to_host (same logic goes for _path)
  • to_host and to_path are fields which we'll use to build redirect Location: URL HTTP header
  • request_host and request_path are values which arrived with the HTTP request (meaning this is what the client requested)

happy path - from_ fields are matching

from_host from_path to_host to_path request_host request_path Location HTTP header Location HTTP header (alternative interpretation)
Some("a-b-c") Some("blog") Some("{canister_id}.xyz.app") Some("/home") a-b-c.ic0.app /blog https://a-b-c.xyz.app/home
#!/bin/bash
clear
projects_dir="$HOME/Desktop"
working_dir="$projects_dir/jira-tickets/SDK-42"
identity_pem_file="$HOME/.config/dfx/identity/default/identity.pem"
cd $working_dir
shopt -s expand_aliases
alias icx-assetss=$projects_dir/agent-rs/target/debug/icx-asset
0 1
0 sp|Q9W678|P53_BARBU 0.9117647058823529
1 sp|Q29537|P53_CANFA 0.7058823529411765
2 sp|P67938|P53_BOSIN 0.7058823529411765
3 sp|P67939|P53_BOVIN 0.3235294117647059
4 sp|P10360|P53_CHICK 0.5882352941176471
5 sp|Q9WUR6|P53_CAVPO 0.47058823529411764
6 sp|P13481|P53_CHLAE 0.38235294117647056
7 sp|O09185|P53_CRIGR 0.5
8 sp|P79734|P53_DANRE 0.4411764705882353
@smallstepman
smallstepman / dash-colab-vtk-demo.ipynb
Last active September 25, 2021 20:56
dash-colab-vtk-demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smallstepman
smallstepman / expanded_main.rs
Created March 21, 2021 16:19
enum_dispatch expansion
#![feature(prelude_import)]
#[prelude_import]
use std::prelude::v1::*;
#[macro_use]
extern crate std;
use enum_dispatch::enum_dispatch;
struct Generator {
source_id: String,
id: String,
}