Skip to content

Instantly share code, notes, and snippets.

@robinovitch61
robinovitch61 / bubble-tea-demo.go
Last active August 17, 2022 17:56
Bubble Tea Demo
package main
import (
"encoding/json"
"fmt"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"io/ioutil"
"log"
"net/http"
@robinovitch61
robinovitch61 / main.go
Created May 16, 2022 18:59
BubbleTea Subcomponent Parent Updater Functions
package main
import (
"fmt"
tea "github.com/charmbracelet/bubbletea"
"os"
)
type SubComponentModel struct {
onClick func()
@robinovitch61
robinovitch61 / unsubscribe.js
Created March 11, 2022 18:21
Bookmarklet for unsubscribe button big
// https://caiorss.github.io/bookmarklet-maker/
const anchors = Array.from(document.getElementsByTagName("a"))
console.log(anchors);
const unsubscribe = anchors.find(anchor => anchor.innerText.toLowerCase().includes("unsubscribe")).cloneNode(true)
unsubscribe.innerText = "UNSUBSCRIBE"
unsubscribe.style.fontSize = "50px"
document.body.prepend(unsubscribe)
@robinovitch61
robinovitch61 / pannable-zoomable-html5-canvas-react-typescript.tsx
Last active May 22, 2024 14:39
A pannable, zoomable, html5 canvas in React and Typescript
// sandbox here: https://codesandbox.io/s/p3itj?file=/src/Canvas.tsx
import {
useEffect,
useCallback,
useLayoutEffect,
useRef,
useState
} from "react";
import * as React from "react";
  1. Clone the example repo and edit this part of this file
  omeroweb:
    image: "openmicroscopy/omero-web-standalone:5.6" <---- find the name and tag on dockerhub of the one you want
    environment:
      OMEROHOST: omeroserver
    networks:
      - omero
    ports:
 - "4080:4080"
@robinovitch61
robinovitch61 / pyenv_setup.md
Last active January 27, 2021 22:11
pyenv setup

pyenv is a python version manager. It allows you to install, activate, and set a system default for python versions like python 2.7, python 3.9, etc.

  1. Install pyenv:
curl https://pyenv.run | bash
  1. Add the following to your ~/.bashrc or ~/.zshrc
eval "$(pyenv init -)"
@robinovitch61
robinovitch61 / multiprocessing.ipynb
Last active October 30, 2019 17:20
multiprocessing.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@robinovitch61
robinovitch61 / race_condition.ipynb
Last active October 30, 2019 16:14
race_condition.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@robinovitch61
robinovitch61 / threading.ipynb
Last active October 30, 2019 00:25
Multithreading in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<!-- ################### -->
<!-- STYLE -->
<!-- ################### -->
<style>
body {
margin: 0;
}