Skip to content

Instantly share code, notes, and snippets.

View alikaramniya's full-sized avatar
😎

AliKaram98 alikaramniya

😎
View GitHub Profile
@john-doherty
john-doherty / add-query-params-to-url.js
Last active August 18, 2024 00:55
Add query string parameters to a URL in JavaScript (works with browser/node, merges duplicates and works with absolute and relative URLs)
/**
* Adds query params to existing URLs (inc merging duplicates)
* @param {string} url - src URL to modify
* @param {object} params - key/value object of params to add
* @example
* // returns /guides?tag=api
* addQueryParamsToUrl('/guides?tag=hardware', { tag:'api' })
* @example
* // returns https://orcascan.com/guides?tag=api
* addQueryParamsToUrl('https://orcascan.com/guides?tag=hardware', { tag: 'api' })
@sts10
sts10 / kitty.conf
Created January 16, 2020 20:24
My config file for Kitty Terminal Emulator
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
font_family JetBrains Mono Medium
bold_font JetBrains Mono Bold
@marcel-dempers
marcel-dempers / devilspie-vscode-transparency.sh
Created September 22, 2019 09:49
How to make VSCode transparent in Linux
#!/bin/bash
sudo apt-get install -y devilspie
mkdir -p ~/.devilspie
echo '
(if (contains (window_class) "Code")
(begin
(spawn_async (str "xprop -id " (window_xid) " -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 "))
(spawn_async (str "xprop -id " (window_xid) " -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0xD8000000"))
@gaearon
gaearon / index.html
Last active September 22, 2024 19:21
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@pokisin
pokisin / Uninstall.md
Last active June 8, 2024 07:53
Uninstall git, ubuntu

Uninstall git

To remove just git package itself from Ubuntu 14.04 execute on terminal:

$ sudo apt-get remove git

Uninstall git and it's dependent packages

To remove the git package and any other dependant package which are no longer needed from Ubuntu Trusty.

$ sudo apt-get remove --auto-remove git
@xinshuoweng
xinshuoweng / .tmux.conf
Created October 24, 2016 14:40 — forked from Rangozhang/.tmux.conf
A vim-friendly tmux config
# change prefix to Ctrl-a (like in gnu-screen)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# start with window 1 (instead of 0)
set -g base-index 1
@wojteklu
wojteklu / clean_code.md
Last active November 4, 2024 06:15
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@jnaulty
jnaulty / .tmux.conf
Last active July 24, 2021 20:21 — forked from nicolasochem/.tmux.conf
The best tmux and vim configuration in the universe
# Our .tmux.conf file
# Setting the prefix from C-b to C-s
set -g prefix C-s
# enable vi keys.
setw -g mode-keys vi
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
@tsbarnes
tsbarnes / monokai-dark.theme
Created August 12, 2015 04:53
Monokai color scheme for XFCE4 terminal, place it in /usr/share/xfce4/terminal/colorschemes
[Scheme]
Name=Monokai (dark)
TabActivityColor=#a6a6e2e22e2e
ColorCursor=#f8f8f8f8f2f2
ColorForeground=#f8f8f8f8f2f2
ColorBackground=#272728282222
ColorPalette=#272728282222;#f9f926267272;#a6a6e2e22e2e;#f4f4bfbf7575;#6666d9d9efef;#aeae8181ffff;#a1a1efefe4e4;#f8f8f8f8f2f2;#757571715e5e;#f9f926267272;#a6a6e2e22e2e;#f4f4bfbf7575;#6666d9d9efef;#aeae8181ffff;#a1a1efefe4e4;#f9f9f8f8f5f5