Skip to content

Instantly share code, notes, and snippets.

Working from home

Kareem H neumachen

Working from home
View GitHub Profile
neumachen / docker-traefik-label.txt
Created Jul 4, 2022 — forked from ismailyenigul/docker-traefik-label.txt
docker labels for traefik reverse proxy multiple ports in a single container with different domain names
View docker-traefik-label.txt
--label "traefik.enable=true" \
--label "traefik.protocol=http" \
--label "traefik.first.port=80" \
--label "" \
--label "traefik.second.port=8080" \
--label "" \
Above labels will allow us to forward to docker container port 80 and to same container's port 8080
neumachen /
Created Jul 3, 2022 — forked from mahemoff/
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

View gist:fb30a03ff9e9c9fa9d9aed7711cd72ec
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort)
fshow() {
local out shas sha q k
while out=$(
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --multi --no-sort --reverse --query="$q" \
--print-query --expect=ctrl-d --toggle-sort=\`); do
q=$(head -1 <<< "$out")
k=$(head -2 <<< "$out" | tail -1)
neumachen / graphq_testing_type_tester.rb
Created Mar 21, 2022 — forked from bessey/graphq_testing_type_tester.rb
Beginnings of a reusable GraphQL Ruby type testing toolkit.
View graphq_testing_type_tester.rb
# Assumptions
# 1. Your schema implements the Relay Query.node(id:) field, Schema.id_from_object, and Schema.object_from_id
# 2. The types you wish to test implement the Node interface
# 3. (In order to be compatible with Node) the object you test resolves to a single type
# 4. The object you wish to test has a unique identifier
# Maybe we can remove 3. by making use of an override in context?
# Since Schema.resolve_type takes a context object, perhaps if you must test an object that is
# presented via multiple types in the schema, you can force the decision via context. I have not
neumachen / .zshrc
Created Jan 12, 2022 — forked from acepukas/.zshrc
Convenient commands for ripgrep and fzf.vim integration
View .zshrc
# RIPGREP config (this is the environment variable that vim is reading when building the rg command)
# In this case the shell is zsh. Adjust accordingly based on preferred shell and needs.
export RG_COMMAND_BASE='rg --ignore-file ~/.ignore --hidden --follow'
# Minimal FZF config. Shares the RG_COMMAND_BASE env var.
[ -f $HOME/.fzf.zsh ] && source $HOME/.fzf.zsh
neumachen /
Created Sep 18, 2021 — forked from bbqtd/
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):


Increasing fs.inotify.max_user_watches for Docker images

TL;DR You can't set those for an image during build time becasue Docker takes the sysctl configuration from the Host. So, set the config on your host machine.

As in this link, to increase the maximum watchers, we need set fs.inotify.max_user_watches to a higher number in /etc/sysctl.conf.

neumachen / .ctags
Created Sep 13, 2021 — forked from romainl/.ctags
My ctags config
View .ctags
--regex-less=/^[ \t&]*#([A-Za-z0-9_-]+)/\1/i,id,ids/
--regex-less=/^[ \t&]*\.([A-Za-z0-9_-]+)/\1/c,class,classes/
--regex-less=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/
--regex-less=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/
--regex-less=/^[ \t]*(@[A-Za-z0-9_-]+):/\1/v,variable,variables/
--regex-less=/\/\/[ \t]*(FIXME|TODO)[ \t]*\:*(.*)/\1/T,Tag,Tags/
neumachen / advancedsettings.xml
Created Aug 3, 2021 — forked from htpcBeginner/advancedsettings.xml
AdvacedSettings.xml for Kodi with MySQL and other tweaks.
View advancedsettings.xml
<!-- General Settings -->
<loglevel hide="true">-1</loglevel> <!-- Comment: Disables logging -->
<skiploopfilter>0</skiploopfilter> <!-- Comment: For RPi or similar use 16 or higher (low CPU usage) -->
<!-- MySQL Library -->
neumachen / advancedsettings.xml
Created Aug 3, 2021 — forked from UndeadKernel/advancedsettings.xml
Good parsing settings for Kodi
View advancedsettings.xml
<video> <!-- Stop XBMC indexing some unwanted common items -->
<excludetvshowsfromscan action="prepend">
<regexp>(?i)sample</regexp> <!-- Greedy, whole path, case insensitive ignore -->
<regexp>(?i)uTorrentPartFile</regexp> <!-- Ignore common scrap files -->
<regexp>(?i)[\. \-_](?:nc)?(?:op|ed|sp|pv)[\. \-_\(\[\d]</regexp>