Skip to content

Instantly share code, notes, and snippets.

import datetime
import pandas as pd
import csv
import os
class CashFlow(object):
def __init__(self, name='cashflow'):
self.name = name
@cw123hb
cw123hb / plan.csv
Last active May 23, 2022 16:30
Gantt
Task Start Finish
test 2022-06-23 2022-07-30
test 2022-08-23 2022-09-30
@cw123hb
cw123hb / goform.go
Created May 20, 2022 15:26
A simple demo of using a form in Golang
// forms.go
package main
import (
"html/template"
"net/http"
)
type ContactDetails struct {
Email string
@cw123hb
cw123hb / mycli.txt
Created May 20, 2022 04:29
mycli commands
pip install -U mycli
$ mycli --help
Usage: mycli [OPTIONS] [DATABASE]
A MySQL terminal client with auto-completion and syntax highlighting.
Examples:
- mycli my_database
- mycli -u my_user -h my_host.com my_database
@cw123hb
cw123hb / budget.csv
Created April 15, 2022 08:00
sample budget
description period type amount
rent monthly expense 5400
food weekly expense 900
heating monthly expense 1000
salary monthly income 32000
sed -i '/```/,/```/d' example.md
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─██████████████─██████████████─████████████████───████████████████───████████──████████───────────██████████████─██████──██████─██████████████─
─██░░░░░░░░░░██─██░░░░░░░░░░██─██░░░░░░░░░░░░██───██░░░░░░░░░░░░██───██░░░░██──██░░░░██───────────██░░░░░░░░░░██─██░░██──██░░██─██░░░░░░░░░░██─
─██░░██████████─██░░██████░░██─██░░████████░░██───██░░████████░░██───████░░██──██░░████───────────██████░░██████─██░░██──██░░██─██░░██████████─
─██░░██─────────██░░██──██░░██─██░░██────██░░██───██░░██────██░░██─────██░░░░██░░░░██─────────────────██░░██─────██░░██──██░░██─██░░██─────────
─██░░██████████─██░░██──██░░██─██░░████████░░██───██░░████████░░██─────████░░░░░░████─────────────────██░░██─────██░░██████░░██─██░░██████████─
─██░░░░░░░░░░██─██░░██──██░░██─██░░░░░░░░░░░░██───██░░░░░░░░░░░░██───────████░░████───────────────────██░░██─────██░░░░░░░░░░██─██░░░░░░░░░░██─
─██████████░░██
@cw123hb
cw123hb / quick.dot
Created January 28, 2022 06:15
quick and dirty graphviz
/* dot -Tx11 quick.dot */
digraph G {
graph [fontname = "Handlee"];
node [fontname = "Handlee"];
edge [fontname = "Handlee"];
label = "New User Scenario";
labelloc = "t";
bgcolor=transparent;
<!DOCTYPE html>
<html>
<head>
<title>Master Password Generator </title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/css/materialize.min.css">
</body>
</head>
<body>
<nav>
<div class="nav-wrapper teal lighten-2">
@cw123hb
cw123hb / index.html
Created October 13, 2021 06:34
todo test
<!DOCTYPE html>
<html>
<head>
<title>To do list</title>
</head>
<body>
<h1>To do list</h1>
</body>