Skip to content

Instantly share code, notes, and snippets.

View vdloc's full-sized avatar
:accessibility:
Good things take time

Vũ Đức Lộc vdloc

:accessibility:
Good things take time
View GitHub Profile
@vdloc
vdloc / elasticsearch.md
Created December 19, 2023 14:38 — forked from dominicsayers/elasticsearch.md
Configuring ElasticSearch to use less memory

What I actually did

/etc/security/limits.conf

elasticsearch hard memlock 100000

/etc/default/elasticsearch

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@vdloc
vdloc / .zshrc
Last active November 9, 2023 10:49
my zsh configuration
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@vdloc
vdloc / write-log-magento.txt
Last active September 18, 2023 05:35
One line Magento log
\Magento\Framework\App\ObjectManager::getInstance()
->get('Psr\Log\LoggerInterface')->debug('Your Message');
alias mg-index="php bin/magento indexer:reindex"
alias mg-deploy="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend && mg-clear-cache"
alias mg-deploy-fast="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend en_US de_DE && mg-clear-cache"
alias change-php="sudo update-alternatives --config php"
alias mg-clear-cache="bin/magento cache:flush"
alias start-elasticsearch="sudo systemctl --now enable elasticsearch"
alias mg-full-refresh="start-es && php bin/magento indexer:reindex && php bin/magento setup:upgrade && php bin/magento setup:di:compile && rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend/ && php bin/magento setup:static-content:deploy -f && php bin/magento cache:flush "
alias mg-compile="php bin/magento setup:di:compile"
alias mg-upgrade="php bin/magento setup:upgrade"
alias mg-deploy-admin="sudo php bin/magento s:s:d -f -a adminhtml"
@vdloc
vdloc / gist:150524176ac4ffcb9521c343674066c8
Last active August 4, 2022 08:49 — forked from lilaw/gist:dc005c046d45327b3211f6cb921c20ba
fix puppeteer dependencies in WSL2 ubuntu 20.04
 ldd ./node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome | grep no
        libnss3.so => not found
        libnssutil3.so => not found
        libsmime3.so => not found
        libnspr4.so => not found
        libatk-1.0.so.0 => not found
        libatk-bridge-2.0.so.0 => not found
        libcups.so.2 => not found
 libxkbcommon.so.0 => not found
@vdloc
vdloc / gist:e22f46ae1d6a9fa875d6409f54aeb110
Created January 16, 2022 03:59
Vietnamese Banned Words
nứng lồn
nứng cặc
siêu nứng
nứng
địt
xinh nứng
dâm đãng
máu dâm
lồn dâm
dâm bạo
@vdloc
vdloc / font-weights.md
Created June 30, 2021 10:48 — forked from lukaszgrolik/font-weights.md
Commonly used names for CSS font-weight values

unknown source

value name
100 extralight/ultralight
200 light/thin
300 book/demi/light
400 regular/normal
500 medium
600 semibold/demibold
@vdloc
vdloc / 01-custom.sh
Created June 29, 2021 14:37
/etc/update-motd.d/ custom MOTD file
#!/bin/sh
echo "Welcome my lord, the most lonely person on the planet.\n"
echo "Here is your system information:\n"
/usr/bin/screenfetch
echo
echo "and your disk usage: \n"
export TERM=xterm; inxi -D
echo
echo "Finally, you may want to know the weather outside: \n"
ansiweather -l hanoi
@vdloc
vdloc / cloudSettings
Last active December 20, 2021 04:33
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-12-20T04:32:57.743Z","extensionVersion":"v3.4.3"}