Skip to content

Instantly share code, notes, and snippets.

View Sama-004's full-sized avatar

samanyu Sama-004

View GitHub Profile
@Sama-004
Sama-004 / config
Created June 28, 2024 18:53
i3Status config
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
#include <bits/stdc++.h>
using namespace std;
#define nl cout << '\n'
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef vector<int> vi;
@Sama-004
Sama-004 / script.js
Created May 22, 2024 08:44
Download view only pdf google drive
let jspdf = document.createElement( "script" );
jspdf.onload = function () {
let pdf = new jsPDF();
let elements = document.getElementsByTagName( "img" );
for ( let i in elements) {
let img = elements[i];
if (!/^blob:/.test(img.src)) {
continue ;
}
let canvasElement = document.createElement( 'canvas' );
{"theme":"catppuccin","themeLight":"serika","themeDark":"serika_dark","autoSwitchTheme":false,"customTheme":true,"customThemeColors":["#1e1e2e","#a6e3a1","#f5e0dc","#585b70","#181825","#cdd6f4","#f38ba8","#eba0ac","#f38ba8","#eba0ac"],"favThemes":[],"showKeyTips":true,"smoothCaret":"medium","quickRestart":"tab","punctuation":false,"numbers":false,"words":50,"time":15,"mode":"time","quoteLength":[1],"language":"english","fontSize":2,"freedomMode":false,"difficulty":"normal","blindMode":false,"quickEnd":false,"caretStyle":"default","paceCaretStyle":"default","flipTestColors":false,"layout":"default","funbox":"none","confidenceMode":"off","indicateTypos":"off","timerStyle":"mini","liveSpeedStyle":"off","liveAccStyle":"off","liveBurstStyle":"off","colorfulMode":false,"randomTheme":"off","timerColor":"main","timerOpacity":"1","stopOnError":"off","showAllLines":false,"keymapMode":"off","keymapStyle":"staggered","keymapLegendStyle":"lowercase","keymapLayout":"overrideSync","keymapShowTopRow":"layout","fontFamily":"J
#works
set -g default-terminal "xterm-256color"
#set -g default-terminal "alacritty"
set -g mouse on
set-option -ga terminal-overrides "xterm-256color:Tc"
#set-option -ga terminal-overrides ",alacritty:Tc"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
unbind C-b
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
import=[
# uncomment the flavour you want below:
#"~/.config/alacritty/catppucin/catppuccin-latte.yml"
"~/.config/alacritty//catppuccin-mocha.toml"
# "~/.config/alacritty/catppuccin-frappe.toml"
# "~/.config/alacritty/catppuccin-macchiato.toml"
# "~/.config/alacritty/catppuccin-mocha.toml"
]
# Configuration for Alacritty, the GPU enhanced terminal emulator.
local wezterm = require("wezterm")
local act = wezterm.action
return {
keys = {
{ key = "v", mods = "CTRL", action = act.PasteFrom("Clipboard") },
--{ key = "V", mods = "CTRL", action = act.PasteFrom("PrimarySelection") },
},
color_scheme = "Catppuccin Mocha", -- or Macchiato, Frappe, Latte
enable_tab_bar = false,
@Sama-004
Sama-004 / .vimrc
Created January 16, 2024 14:54
vim rc
syntax on
set noerrorbells
set nowrap
set cindent
"set autoindent
"set smartindent noexpandtab tabstop=4 shiftwidth=4
set smartcase
" Remap 'kj' to Escape in insert mode
inoremap kj <Esc>
@Sama-004
Sama-004 / installation.md
Last active January 13, 2024 09:21
Setting Up mongodb on arch linux

Setting up mongodb on arch linux

sudo pacman -S openssl
git clone https://aur.archlinux.org/mongosh-bin.git
cd mongosh-bin
makepkg -si
git clone https://aur.archlinux.org/mongodb-bin.git
cd mongodb-bin
makepkg -si
sudo systemctl start mongodb