Skip to content

Instantly share code, notes, and snippets.

View cybersiddhu's full-sized avatar

Siddhartha Basu cybersiddhu

View GitHub Profile
@cybersiddhu
cybersiddhu / rust-command-line-utilities.markdown
Created October 2, 2022 12:30 — forked from sts10/rust-command-line-utilities.markdown
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, exa, fd, hyperfine, miniserve, ripgrep, just, zoxide and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
  • bat: A replacement for cat that provides syntax highlighting and other features.
  • bottom: Yet another cross-platform graphical process/system monitor.
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

For vitejs

Install packages

yarn add -D vite-tsconfig-paths @tsconfig/recommended

tsconfig.json

@cybersiddhu
cybersiddhu / WikiContentDisplay.tsx
Last active May 3, 2022 17:00
Functional pipeline to return markdown content from wiki
import { useRouter } from "next/router"
import { useState, useEffect, useMemo } from "react"
import * as E from "fp-ts/Either"
import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/lib/function"
import { cloneGithubWiki } from "../../hooks/useGithubWiki"
import { toOutput, WikiContentEither } from "../../components/WikiDisplay"
import FS from "@isomorphic-git/lightning-fs"
export default function Gene() {
@cybersiddhu
cybersiddhu / launch.js
Created February 18, 2021 16:32 — forked from rw3iss/launch.js
browsersync script to hot reload any client project
const bs = require('browser-sync').create();
// Config params (relative to where npm/script is called from):
const PORT = 3000;
const OUTPUT_DIR = './build';
bs.watch(`${OUTPUT_DIR}/**/*.js`, function (event, file) {
bs.reload("*.js");
})
@cybersiddhu
cybersiddhu / build.js
Created February 18, 2021 16:30 — forked from rw3iss/build.js
esbuild.js frontend build script
var fs = require("fs");
var path = require("path");
// Config params (relative to where npm/script is called from):
const APP_BASE = './src';
const ENTRY_FILE = `index.tsx`;
const OUTPUT_DIR = './build';
const OUTPUT_FILE = 'app.js';
const IS_DEV = false;
const TARGET = 'es2018';
@cybersiddhu
cybersiddhu / macapp.go
Created February 6, 2021 19:24 — forked from mholt/macapp.go
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:

❌ ❌ Ontology errors ❌ ❌

File: dicty_pheno.obo

💥Violations💥

  • best of the best
  • error in fun
  • exceptionally fun

File: dicty_env.obo

💥Violations💥

  • no env
🏆 646 Contributions in year 2020
📦 Used NaN undefined in GitHub's Storage
📜 60 Public Gists
🔑 7 Public Keys
💼 Opted to Hire
@cybersiddhu
cybersiddhu / pheno.go
Created June 28, 2019 18:24
phenotype resolver
package main
import (
"context"
"fmt"
"github.com/dictyBase/go-genproto/dictybaseapis/annotation"
)
func (r *StrainResolver) Phenotypes(ctx context.Context, obj *models.Strain) ([]*models.Phenotype, error) {