Skip to content

Instantly share code, notes, and snippets.

View georgitrifonov's full-sized avatar

Georgi Trifonov georgitrifonov

View GitHub Profile
<#
Create Unix VM's.
PREREQUISITES:
- A VM that has been installed with an OS that supports cloud-init
- cloud-init is installed on the vm
How it works:
- Asks for a bunch of parameters
- Creates a disk from parent vhdx for speed
@holmberd
holmberd / php-pools.md
Last active May 30, 2024 10:30
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@connorjan
connorjan / rsub.md
Last active March 6, 2024 21:06
Editing Files Remotely via SSH on SublimeText 3

Editing Files Remotely via SSH on SublimeText 3

Sometimes you need to edit a file on a remote server, but using vim/emacs is not very practical, due to lag and speed of screen refresh.

TextMate users have the classic rmate, but it was implemented in Ruby, which may not be available on the remote server.

A better option is to use this version of rmate, implemented in pure Bash. It's a single file, self-contained, and with no external dependencies.

Step by step:

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@munim
munim / set-ip.md
Last active May 3, 2024 18:26
Set network IP Static/DHCP using Powershell

#How to set network IP Static/DHCP using Powershell in Windows 8 and above

This is a powershell script to set IP address for a network adapter using Powershell and restart the network adapter after it completes. Follow the below steps and detailed information about the parameters below.

Create a ps1 file using the below code

# Author: Munim (me@munim.net)
@rsperl
rsperl / generate_iterm2_dynamic_profiles.pl
Last active July 25, 2022 13:08
Reads in ~/.ssh/config and generates iterm2 dynamic profiles #perl #iterm2 #macos #ssh #snippet
#!/usr/bin/env perl
#
# licensed under GPL v2, same as iTerm2 https://www.iterm2.com/license.txt
#
use strict;
use JSON;
my $output = $ENV{HOME} . "/Library/Application\ Support/iTerm2/DynamicProfiles/profiles.json";
@jparrill
jparrill / hostname_servers
Created October 14, 2013 06:16
Names for servers
Hostnames!
You have to set up a bunch of machines, and suddenly have a mental block as to what to call them all?
Well, here's some good hostnames to get you going.
The idea is to come up with some kind of category, so that people have something to remember all the names by. Some categories: Geographical (countries, cities, parks, rivers, lakes, streets), entertainment (flintsones, simpsons, disney films, celebrities), companies (hotels, airports, local shops, restarants), astronomy (planets, comets, space missions), literature (mythology, philosophers, writers of particular generes, languages), political (presidents, judges, congressmen, terminology), science (units of measure, anatomy, instruments, scientists), industry (tools, machines, inventions, inventors), computers (terminology, programming languages, number systems).
Some hostnames I've seen, used, or expect to use..
(Not responsible for typos; do your own spell checks!)