Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / linux-setup.sh
Last active May 1, 2024 18:40
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@mh-firouzjah
mh-firouzjah / better_powershell.md
Last active May 1, 2024 18:38
how to add zsh-like theme and feature to windows powershell

Better PowerShell

Theme | History | KeyBinding

MyPowershell

in order to make windows powershell more comfortable and add a some theme and features like history binding, auto complete on keypress and so on, if you have used linux teminl wiht zsh for example, we are going to make powershell like that as much as we can.

What we will achieve

@wojteklu
wojteklu / clean_code.md
Last active May 1, 2024 18:38
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

@erhan
erhan / ulke.json
Last active May 1, 2024 18:34
Telefon kodları ile türkçe ülke listesi json
[
{
"name": "ABD Virgin Adaları",
"dial_code": "+1 340",
"code": "VI"
},
{
"name": "Aland Adaları",
"dial_code": "+358",
"code": "AX"
@mkropat
mkropat / knownpaths.py
Last active May 1, 2024 18:31
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 1, 2024 18:39
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@dmancloud
dmancloud / How to Install SonarQube in Ubuntu Linux.md
Last active May 1, 2024 18:31
How to Install SonarQube in Linux

How to Install Sonarqube in Ubuntu Linux

Prerequsites

Virtual Machine running Ubuntu 22.04 or newer

Install Postgresql 15

sudo apt update
sudo apt upgrade

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
@fitzypop
fitzypop / starship_git_bash_windows.md
Last active May 1, 2024 18:30
Installing Starship.rs on Git Bash for Windows

Installing Starship prompt on Git Bash for Windows

Source: https://bleepcoder.com/starship/640385008/unable-to-install-on-windows-git-bash-configuration-not

All scripts should be ran in your git bash terminal, not cmd or ps.

  1. Make/Choose folder where to install: mkdir -p ~/bin/starship && cd ~/bin
  2. Download the install script: curl -fsSL https://starship.rs/install.sh > ./install.sh
  3. Run install script: ./install.sh --bin-dir /c/Users/<username>/bin/starship/ --platform pc-windows-msvc
  4. Finally add the following to the end of your .bashrc file:
@fsantand
fsantand / wireplumber_audio_switcher.py
Created February 8, 2024 23:49
Wireplumber switcher for rofi/dmenu
#!/usr/bin/python3
import sys
import subprocess
"""
Wireplumber sink/source switcher
It lets you pass your sinks/sources into a dmenu dropdown
for ease of access
@ExcelRobot
ExcelRobot / TILE.lambda
Last active May 1, 2024 18:28
TILE Lambda
/*
Name: Tile (TILE)
Description: Tile the outputs of a single-parameter function given an array map of parameters.
Parameters:
params - array of parameters arranged how function results to be tiled
function - single-parameter Lambda name or function
Source: Excel Robot (@ExcelRobot), but inspired by Owen Price's STACKER lambda (https://www.youtube.com/watch?v=wEBLT9QfQRw).
*/
TILE = LAMBDA(params,function,LET(
firstrow, function(INDEX(params,1,1)),