Skip to content

Instantly share code, notes, and snippets.

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

Arm.do jahrmando

🏠
Working from home
View GitHub Profile
@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 26, 2024 21:46
Install Nerd Fonts via Homebrew [updated & fixed]
@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 6, 2024 23:15
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
@hone
hone / readme.md
Last active October 26, 2021 12:11
Private GitHub repos with Bundler on Heroku

Setting Up Private GitHub Repos with Bundler on Heroku

To get a private GitHub repo to work on Heroku, you can leverage the netrc buildpack in conjunction with the Heroku Ruby buildpack.

When setting up the Gemfile, make sure to use the https GitHub URL. This mechanism does not work with git+ssh.

gem "some_private_gem", git: "https://github.com/org/some_private_gem.git"
@jtbonhomme
jtbonhomme / jira-behing-nginx-ssl
Created September 26, 2015 07:49 — forked from alertor/jira-behing-nginx-ssl
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@gingerlime
gingerlime / change_db_owner.sh
Created April 24, 2012 19:32
Postgresql - Changing ownership on all tables
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto