Skip to content

Instantly share code, notes, and snippets.

View bntzio's full-sized avatar

Enrique Benitez bntzio

View GitHub Profile
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@rauchg
rauchg / p.sh
Last active April 27, 2024 10:43
Perplexity CLI in pure shell
#!/usr/bin/env bash
function p() {
jq -n \
--arg content "$*" \
'{
"model": "pplx-7b-online",
"messages": [
{
"role": "system",
"content": "Be precise and concise."
@bashbunni
bashbunni / .zshrc
Created October 27, 2022 21:41
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 4, 2024 23:11
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

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, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@davidteren
davidteren / nerd_fonts.md
Last active April 26, 2024 21:46
Install Nerd Fonts via Homebrew [updated & fixed]
@LukeMathWalker
LukeMathWalker / audit.yml
Last active May 5, 2024 20:53
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@jordanburke
jordanburke / Upload.tsx
Last active December 29, 2020 22:44
React Simple S3 Uploader
import React, {useState} from "react";
import axios from "axios";
import config from "../config"
const endpoint = config.apiGateway.URL;
export const Upload = () => {
const [file, setFile] = useState<File | undefined>()
@xiaoyunyang
xiaoyunyang / TypeScriptMigration.md
Last active April 16, 2022 14:02
A guide for how to migrate your project from Flow to TypeScript
@ryanatkn
ryanatkn / tsconfig.json
Last active April 27, 2024 22:35
A TypeScript 3.5 tsconfig.json with all options organized and with documentation comments
{
// Commented-out options have their default values.
"include": ["src/**/*"],
"exclude": ["node_modules/*"],
// "files": [], // A list of relative or absolute file paths to include.
// "extends": "", // A string containing a path to another configuration file to inherit from.
// "references": [], // An array of objects `{"path": "./to/dirOrConfig"}` that specifies projects to reference.
// "compileOnSave": false, // Signals to the IDE to generate all files for a given tsconfig.json upon saving.
"compilerOptions": {
@romkatv
romkatv / Pure style for Powerlevel10k.md
Last active May 4, 2024 16:34
Pure style for Powerlevel10k

Powerlevel10k can generate the same prompt as Pure.

pure

Installation

git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc