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 / wezterm.lua
Last active September 23, 2024 03:52
local wezterm = require("wezterm")
local act = wezterm.action
local config = {
font = wezterm.font_with_fallback({
"JetBrains Mono NL",
"Noto Color Emoji",
"Symbols Nerd Font Mono",
}),
-- color_scheme = "Catppuccin Mocha",
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.
@Sama-004
Sama-004 / i3
Last active September 23, 2024 03:51
# 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!
{"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
@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' );
#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 / config
Last active September 23, 2024 03: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
-- inserts a row into public.user_profiles with only id and user_id
create or replace function public.handle_new_user()
returns trigger
language plpgsql
security definer set search_path = ''
as $$
begin
insert into public.user_profiles (id, user_id, username)
VALUES (new.id, new.id, (new.raw_user_meta_data->>'username'));
return new;
[greenclip]
history_file = "/home/sama/.cache/greenclip.history"
max_history_length = 50
max_selection_size_bytes = 0
trim_space_from_selection = true
use_primary_selection_as_input = false
blacklisted_applications = []
enable_image_support = true
image_cache_directory = "/tmp/greenclip"
static_history = [
set -g default-terminal "screen-256color"
set -ga terminal-overrides ',*256color*:smcup@:rmcup@'
set -g mouse on
set-option -ga terminal-overrides "xterm-256color:Tc"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'