Skip to content

Instantly share code, notes, and snippets.

View jivko's full-sized avatar

Jivko Georgiev jivko

View GitHub Profile
@jivko
jivko / nginx-wordpress.conf
Created January 4, 2023 01:39 — forked from nfsarmento/nginx-wordpress.conf
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@jivko
jivko / certbot.sh
Last active December 5, 2022 23:51 — forked from fideloper/certbot.sh
Certbot on Ubuntu, wildcard subdomains via CloudFlare DNS challenge
# Install Certbot via Snaps
snap install core; snap refresh core
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
# Install DNS CloudFlare plugin
snap set certbot trust-plugin-with-root=ok
snap install certbot-dns-cloudflare
# This directory may not exist yet

Ultimate Beginner's Guide to Proxmox GPU Passthrough

mirror of The Ultimate Beginner's Guide to GPU Passthrough (Proxmox, Windows 10) by /u/cjalas

>Welcome all, to the first installment of my Idiot Friendly tutorial series! I'll be guiding you through the process of configuring GPU Passthrough for your Proxmox Virtual Machine Guests. This guide is aimed at beginners to virtualization, particularly for Proxmox users. It is intended as an overall guide for passing through a GPU (or multiple GPUs) to your Virtual Machine(s). It is not intended as an all-exhaustive how-to guide; however, I will do my best to provide you with all the necessary resources and sources for the passthrough process, from start to finish. If something doesn't work properly, please check /r/Proxmox, /r/Homelab, /r/VFIO, or

Installation & Configuration Guide - Dokku DigitalOcean

  • Connect to our droplet via SSH
  • Add Swap on Ubuntu 14.04
  • Installing Dokku Plugins
  • Creating Apps
  • Domains Configuration
  • Configuring Dokku Plugins
@jivko
jivko / date_time_picker_rails.md
Created March 7, 2022 19:36 — forked from maxivak/date_time_picker_rails.md
Datetime picker in Rails app

Date time picker in Rails app

There are several options to make Date input in Rails application:

  • Default inputs from simple_form
  • HTML 5 date input
  • Text input with jQuery UI Date time picker
  • Other plugins for date input with Bootstrap 4
@jivko
jivko / migrate_im_to_vips.md
Created March 1, 2022 22:33 — forked from brenogazzola/migrate_im_to_vips.md
Steps to migrate ImageMagick to Libvips

For apps built before the image_processing gem became the default, the migration will involve two steps:

  1. Migrating to the image processing syntax while still using ImageMagick;
  2. Switching to Vips and updating the compression options;

Migrate to the image processing syntax

Before changing from ImageMagick to Vips, it's better to first test the new syntax and ensure everything is still working.

1. Move everything that has to do with compression to a saver hash:

variant(format: :jpg, strip: true, quality: 80)

Setting up Sinatra Project

create an empty project and add a Gemfile

cd ~/Desktop
mkdir project-name
cd project-name
touch Gemfile
@jivko
jivko / ruby_on_rails_deployment.md
Created July 23, 2021 00:04 — forked from zentetsukenz/ruby_on_rails_deployment.md
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

Docker

Files and Folders.

|
|\_ app
|...
|\_ docker
| |
@jivko
jivko / gist:d6bfe7f573e57120a1ab2f11c45c530e
Created July 20, 2021 09:14 — forked from hoanghiep90/gist:e3f84de652e28b0d8496
Can’t find the ‘libpq-fe.h header
I need to install pg 0.17.1 gem on a server running CentOS. This is the error message I saw:
# gem install pg -v '0.17.1'
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
@jivko
jivko / Twitter-gem.md
Created January 1, 2021 09:58 — forked from mbd-s/Twitter-gem.md
Building a simple Twitter bot with the Twitter Ruby gem

##Twitter gem overview

The Twitter Ruby gem is a Ruby interface to the Twitter API. It allows you to make all available Twitter API requests (e.g., tweet, follow a user, search, etc.) within a Rails app.

This guide was adapted from multiple sources, including the Twitter Ruby gem configuration page and How to Make a Twitter Bot in Ruby on Rails. Twitter's own API docs are a good resource too, of course.


####Get set up with Twitter To begin, you'll need to register your application with Twitter and get the proper keys. Log into or sign up for a Twitter account, and scroll down to "Manage Your Apps." Click "Create a New App" and fill out the form with the app's details. Once you're on the app's management page, select the "Permissions" tab. Make sure access is set to "Read a