Skip to content

Instantly share code, notes, and snippets.

View ilmoi's full-sized avatar

ilmoi

View GitHub Profile
@ilmoi
ilmoi / README.md
Created June 3, 2022 01:55 — forked from arikfr/README.md
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
@ilmoi
ilmoi / docker-compose.yml
Created March 14, 2022 20:32 — forked from kizzx2/docker-compose.yml
Restart a docker container periodically with docker-compose
version: '3'
services:
app:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stopped
restarter:
image: docker
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
@ilmoi
ilmoi / fomo.sol
Created August 22, 2021 18:22 — forked from hayeah/fomo.sol
fomo3d contract
pragma solidity ^0.4.24;
/**
* @title -FoMo-3D v0.7.1
* ┌┬┐┌─┐┌─┐┌┬┐ ╦╦ ╦╔═╗╔╦╗ ┌─┐┬─┐┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐
* │ ├┤ ├─┤│││ ║║ ║╚═╗ ║ ├─┘├┬┘├┤ └─┐├┤ │││ │ └─┐
* ┴ └─┘┴ ┴┴ ┴ ╚╝╚═╝╚═╝ ╩ ┴ ┴└─└─┘└─┘└─┘┘└┘ ┴ └─┘
* _____ _____
* (, / /) /) /) (, / /) /)
* ┌─┐ / _ (/_ // // / _ // _ __ _(/
* ├─┤ ___/___(/_/(__(_/_(/_(/_ ___/__/_)_(/_(_(_/ (_(_(_
@ilmoi
ilmoi / tui_state_machine.rs
Created July 5, 2021 09:34
State machine for a tui app in rust
use crate::eth::generate_and_save_mnemonic;
use crate::tui::util::event::{Event, Events};
use crate::tui::util::{StatefulList, TabsState};
use bip39::Mnemonic;
use std::collections::HashMap;
use std::io::Stdout;
use std::{error::Error, io, thread};
use termion::raw::RawTerminal;
use termion::{event::Key, input::MouseTerminal, raw::IntoRawMode, screen::AlternateScreen};
use tui::widgets::{List, ListItem, Tabs};