Skip to content

Instantly share code, notes, and snippets.

View jahrmando's full-sized avatar
🏠
Working from home

Armando Uch jahrmando

🏠
Working from home
View GitHub Profile
@iambryancs
iambryancs / pyenv-wsl-ubuntu_22.04.md
Created May 31, 2023 10:31
Using Pyenv in WSL Ubuntu 22.04 LTS to install Python 3.8

Using Pyenv in WSL Ubuntu 22.04 LTS to install Python 3.8

Env

  • Windows 10
  • Ubuntu 22.04 WSL
  • zsh

Requirements

  • git
@zoonderkins
zoonderkins / mac-install-nerd-font.md
Last active June 13, 2023 10:07
Mac install Nerd Font

Mac install Nerd Font (Fire code)

brew cask
brew tap homebrew/cask-fonts 
brew install font-fira-code
brew install font-Fira-Code-nerd-font
brew install font-hack-nerd-font
@davidteren
davidteren / nerd_fonts.md
Last active April 27, 2025 13:47
Install Nerd Fonts via Homebrew [updated & fixed]
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active April 30, 2025 21:07
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@jahrmando
jahrmando / change_db_owner.sh
Last active September 6, 2024 20:37 — forked from gingerlime/change_db_owner.sh
Postgresql - Changing ownership on all tables, funtions and views
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database and schema.
NOTES:
@wateroot
wateroot / mongodb_memory_limit_ubuntu1404.sh
Created January 16, 2018 13:06 — forked from islander/mongodb_memory_limit_ubuntu1404.sh
Limiting MongoDB memory usage with cgroups on Ubuntu 14.04
#!/usr/bin/env bash
# http://brainsuckerna.blogspot.com/2016/05/limiting-mongodb-memory-usage-with.html
# (c) Miadzvedz Mikalai, 2016. brainsucker.na at gmail.com
# init scripts (c) frank2, see http://frank2.net/cgroups-ubuntu-14-04/ for description and details
# more info (no init scripts): using cgroups to limit DB memory https://www.percona.com/blog/2015/07/01/using-cgroups-to-limit-mysql-and-mongodb-memory-usage/
#
# execute from shell:
# sudo bash -c 'curl -o- http://brains.by/misc/mongodb_memory_limit_ubuntu1404.sh | bash'
{ # this ensures the entire script is downloaded #
@sigmike
sigmike / rmagick_arch.bash
Created January 9, 2018 15:52
Install rmagick with imagemagick 6 on arch
sudo pacman -S libmagick6
PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig gem install rmagick
# or with bundler:
PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig bundle install
@moneytoo
moneytoo / gist:8c95cc39fd4fd9a18858eb15e379d2f5
Last active June 21, 2022 09:29
ImageMagick 6.7.8 with WebP (libwebp) support on CentOS 7
yum -y install bzip2-devel libtiff-devel giflib-devel ghostscript-devel libwmf-devel jasper-devel libtool-ltdl-devel libXext-devel libXt-devel librsvg2-devel OpenEXR-devel libwebp-devel
rpm -ivh http://vault.centos.org/centos/7/updates/Source/SPackages/ImageMagick-6.7.8.9-15.el7_2.src.rpm
sed -i '/BuildRequires:\tghostscript-devel/a BuildRequires:\tlibwebp-devel' /root/rpmbuild/SPECS/ImageMagick.spec
sed -i '/Requires: pkgconfig/a Requires: libwebp' /root/rpmbuild/SPECS/ImageMagick.spec
rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec
# actual install
rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-6.7.8.9-15.el7.centos.x86_64.rpm
@wojteklu
wojteklu / clean_code.md
Last active May 2, 2025 12:24
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

@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install