Skip to content

Instantly share code, notes, and snippets.

View djhojd's full-sized avatar

Claudiu Hojda djhojd

View GitHub Profile
@NorkzYT
NorkzYT / README.md
Last active June 28, 2025 00:04
Proxmox CIFS Share Mount Wizard Script

Proxmox LXC ⇆ CIFS Mount Wizard

proxmox-lxc-cifs-share.sh is an interactive helper that mounts a network CIFS/SMB share on a Proxmox VE node and bind-mounts it into an unprivileged LXC container in one pass.
It automates:

  1. Creating a host-side mountpoint under /mnt/lxc_shares/<folder>.
  2. Writing a properly-tuned /etc/fstab entry (persistent, systemd.automount, uid/gid mapping, etc.).
  3. Mounting the share immediately.
  4. Creating/ensuring a lxc_shares group inside the container (GID 10000) and adding your target user.
  5. Injecting the bind-mount (mpX:) into the live LXC configuration with pct set.
@adojos
adojos / customize-GitBashPrompt.md
Last active March 12, 2025 17:25
Git: Customizing GitBash Shell Prompt #gitbash

Customizing GitBash Shell Prompt and Theme


As an example, lets assume we want to change / customize the following :

  • Change the Title of the GitBash window from default [MINGW64:/directoryName] to [Tushars Gitbash (Win64)]
  • Change the default prompt () to a customized prompt e.g [GitBash (Win64):> ]

👉 Note ($HOME/.bash_profile vs $HOME/.bashrc vs $HOME/.config):

The below described method only focusses on customizing the 'GitBash' prompt and NOT about customizing default 'Bash' prompt on Linux terminals. Hence this method uses the '$HOME/.config' folder for storing 'GitBash' prompt customization as per XDG Directory Specs. If you are looking for customizing default 'Bash' prompt for your Linux terminal you should be using '$HOME/.bashrc' for storing your customization and hence advised not to continue with this method.

Getting Started With Plug'n'Play

If you use create-react-app, #5136 (released with the 2.0) implements a --use-pnp option that allows you to easily create a new project using PnP! In this case, just use create-react-app --use-pnp together with Yarn 1.12, and you're good to go! 👍

Plug'n'Play is a new initiative from Yarn that aims to remove the need for node_modules. It's already available, and has proved being effective even on large-scale infrastructures. This document describes in a few steps how to quickly get started with it. Spoiler alert: it's quite easy 🙂

First, download a package manager that supports it. Yarn 1.12 already does, so that's what we're going to use! To install it, just follow the instructions on our website: https://yarnpkg.com/en/docs/install

If everything is ok, running yarn --version should give you v1.12.1 or higher. If you don't get this result maybe a

@PCreations
PCreations / rxjs-diagrams.md
Last active September 26, 2024 01:44
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@btroncone
btroncone / ngrxintro.md
Last active May 18, 2025 04:12
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@jhcarr
jhcarr / Sencha Env Setup Script
Last active August 29, 2015 14:04
This document describes the steps required to set up Sencha with Phonegap on Ubuntu 14.04 x64
### Ubuntu 14.04, 64-bit
### Sencha Touch Environment Setup
# Update Java environment and tools
sudo apt-get update
sudo apt-get install openjdk-7-jdk
sudo apt-get install openjdk-7-jre
# Double-check version information
java -version
@chrismccoy
chrismccoy / gitcheats.txt
Last active June 29, 2025 17:35
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# transfer all git repos from one org to another org
gh repo list {orgname} --limit 300 --json nameWithOwner -q '.[].nameWithOwner' | xargs -I {} gh api --method POST repos/{}/transfer -f new_owner={neworg}
# aliases to change a git repo from private to public, and public to private using gh-cli
alias gitpublic="gh repo edit --accept-visibility-change-consequences --visibility public"
alias gitprivate="gh repo edit --accept-visibility-change-consequences --visibility private"
@arobson
arobson / abstractions.md
Last active October 14, 2021 06:46
Rabbit.MQ + Node.js Notes

Abstraction Suggestions

Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.

Broker

As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:

  • publish
  • request
  • start/stop subscription
@mwhite
mwhite / git-aliases.md
Last active June 25, 2025 19:10
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc