Skip to content

Instantly share code, notes, and snippets.

View rohshall's full-sized avatar

Salil Wadnerkar rohshall

  • United States
View GitHub Profile
@Roshan-R
Roshan-R / download.rs
Created April 3, 2023 19:48
Download file using ureq with progress bar
use indicatif::{ProgressBar, ProgressStyle};
use std::fs::File;
use std::io;
const DOWNLOAD_TEMPLATE: &str =
"{msg} {spinner:.green} [{elapsed_precise}] [{wide_bar:.cyan/blue}] {bytes}/{total_bytes} ({eta})";
pub fn download_file(url: &str) -> io::Result<()> {
let resp = ureq::get(&url).call().unwrap();
@Cardoso1994
Cardoso1994 / i3_gruvbox_material.config
Last active November 18, 2023 22:26
Gruvbox material colorscheme for i3wm
################################
#### Gruvbox Material Light ####
################################
set $bg #fbf1c7
set $fg #654735
set $red #c14a4a
set $orange #c35e0a
set $green #6c782e
set $blue #45707a
set $purple #945e80
@DrTom
DrTom / MacPort PostgreSQL setup.md
Last active July 26, 2024 07:51
MacPort PostgreSQL setup

PostgreSQL Server Setup on Mac OS with MacPorts

This is in particular aimed at using multiple versions of PostgreSQL at different ports.

export VERSION=15

Install

port info postgresql${VERSION}-server
@iiey
iiey / i3color
Created June 17, 2020 10:42
i3 themes inspired by some colorschemes
#zenburn
set $bg #2c2c2e
set $fg #9f9f9f
set $hi #efef8f
set $ac #a0afa0
set $tx #040404
set $ia #8f8f8f
set $be #8faf9f
set $yw #ccdc90
set $gn #88b090
@bbqtd
bbqtd / macos-tmux-256color.md
Last active August 7, 2024 14:39
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@andrevmatos
andrevmatos / issue
Created April 21, 2019 19:18
Arch Linux /etc/issue

      ### ### ##
    ## ##
┌ #### ### ###   ####   ## ### ## ### ### ### ### ###  ### ###
│  ##  ### ##  ##   ###  [1;37;
@rodricels
rodricels / .tmux.conf
Last active April 21, 2024 12:22
tmux configuration, mouse copy & paste added
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf
# Scroll History
set -g history-limit 50000
# show messages for 4 seconds instead
set -g display-time 4000
# set first window to index 1 (not 0) to map more to the keyboard layout
set-option -g renumber-windows on
@avitevet
avitevet / diet.cpp
Created April 6, 2017 00:05
Using linear programming/simplex method to solve the diet problem: given a set of foods with nutritional data, and a set of nutritional constraints, find the cheapest combination of foods that meets your nutritional needs.
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdio>
#include <cassert>
using namespace std;
typedef double ElementType;
typedef vector<vector<ElementType>> matrix;
@mattmccarty
mattmccarty / sublime-3-maven-build
Created March 8, 2017 00:40
Maven Build System for Sublime Text 3
#
# Tools -> Build System -> New Build System
# Paste the snippet below in the file that opens
# Save as "Maven.sublime-build" in ~/.config/sublime-text-3/Packages/User
# Ctrl+Shift+P will show all maven commands in snippet below if you start to type "Maven"
# Open a pom.xml file and execute a command
#
{
"working_dir": "$file_path",
"shell_cmd":"mvn clean install",
@rkitover
rkitover / prompt.sh
Last active February 22, 2021 23:28
simple version of bash git prompt for ksh (also works in bash) (raw escape, click raw and fetch the gist URL with curl or wget)
shopt -s checkwinsize 2>/dev/null
_cmd_status() {
if [ $? -eq 0 ]; then
printf '\001\002✔'
else
printf '\001\002✘'
fi
}