Skip to content

Instantly share code, notes, and snippets.

View gnanet's full-sized avatar

Gergely Nagy gnanet

  • Self-Employed Freelancer
  • Hungary
  • X @gnanet
View GitHub Profile
@gnanet
gnanet / README.md
Created April 6, 2017 23:15 — forked from tomm90/README.md
Setting up XEN on a Hetzner Dedicated Server (EX-series)

Setting up XEN on a Hetzner Dedicated Server (EX-series)

Author: Michael van Rooijen (@meskyanichi)

DISCLAIMER: I am a programmer, not a sysadmin in my day-to-day life. I provide this guide simply as a self-reference, and as a way to contribute to the community of developers. The main motivation for writing this guide is because of the lack of properly written guides/tutorials. They were either out-dated, inaccurate, in a non-English language or simply too vague to understand (at least for me, as a programmer and not a sysadmin).

I hope this guide helps getting you up and running with your own collection of VPS's on your own Dedicated Server over at Hetzner.de.

Requirements:

@gnanet
gnanet / Slim-Raspbian.sh
Last active December 20, 2016 02:11 — forked from samatjain/Slim-Raspbian.sh
Slim down a Raspbian NOOBS install, but leave omxplayer. ( based on https://blog.samat.org/2015/02/05/slimming-an-existing-raspbian-install/ )
#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
@gnanet
gnanet / check_ssl_tls.sh
Last active December 17, 2016 07:15 — forked from albancrommer/gist:9255086
Single run test for TLS and SSL of all kind of services, with extra advices for letsencrypt
#!/bin/sh
# Released under CC0 licence cf. http://creativecommons.org/publicdomain/zero/1.0/
# In case of
# depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
# verify error:num=20:unable to get local issuer certificate
# download https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem to /etc/ssl/certs
# In case of Proftpd and 21 (unable to verify the first certificate) with letsencrypt the TLSCACertificateFile and TLSRSACertificateFile have to specified separately like in the article below
# https://medium.com/@dchesterton/using-let-s-encrypt-with-proftpd-on-ubuntu-53611157a344
# For the HTTP SNI test this article was used
@gnanet
gnanet / README.md
Last active November 7, 2016 22:55 — forked from Nks/create_host_php.sh
Automatically creating new virtual hosts for nginx with support of the php-fpm

How to use

  • Put create_host_php.sh everywhere where you want
  • Put nginx.vhost.conf.template to /etc/nginx/sites-available/
  • Put pool.conf.template to /etc/php-fpm.d/
  • Edit create_host_php.sh variables
@gnanet
gnanet / save-last-bootstrap-tabs.js
Created August 24, 2016 21:20
Save last bootstrap tabs in localStorage
(function () {
// Simply add a data-save-tabs to your tablist e.g. <ul role="tablist" data-save-tabs="your-custom-slug">
$('[data-save-tabs] a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var savedTabs = JSON.parse(localStorage.getItem('savedTabs'));
if (typeof savedTabs !== 'object' || !savedTabs){
savedTabs = {};
}
savedTabs[$(this).closest('[data-save-tabs]').data('save-tabs')] = $(this).attr('href');
localStorage.setItem('savedTabs', JSON.stringify(savedTabs));
@gnanet
gnanet / custom-menu-items.php
Created July 8, 2016 23:58 — forked from daggerhart/custom-menu-items.php
WordPress class for easily adding custom menu items dynamically to a menu.
<?php
class custom_menu_items {
// only register with wp hooks once
protected $has_registered = false;
// internal list of menus affected
public $menus = array();
// internal list of new menu items
@gnanet
gnanet / letsencrypt-hostname.sh
Created April 26, 2016 21:59 — forked from xgin/letsencrypt-hostname.sh
Secure plesk clean installation with hostname certificate by Let's Encrypt
#!/bin/bash -e
### Copyright 1999-2015. Parallels IP Holdings GmbH. All Rights Reserved.
### Secure plesk clean installation with hostname certificate by Let's Encrypt
export PYTHONWARNINGS="ignore:Non-standard path"
LE_HOME=${LE_HOME:-"/usr/local/psa/var/modules/letsencrypt"}
HOSTNAME=$(hostname)
# Use staging server for testing
# --server https://acme-staging.api.letsencrypt.org/directory
@gnanet
gnanet / xenserver_create_jessie_template_64bit.sh
Last active April 10, 2016 17:15 — forked from jniltinho/xenserver_create_jessie_template_64bit.sh
Script to install a Debian Jessie 8 template on Xenserver 6.5
#!/bin/bash
## Script to install a Debian Jessie 8 template on Xenserver 6.5
## https://gist.github.com/jniltinho/0455fb5f01cfd8bbdbff
# Check if we are running on XenServer 6.5
CHECK65=`cat /etc/redhat-release | grep "XenServer release 6.5"`
if [ "x${CHECK65}" == "x" ]; then echo "This script is intended to be run on XenServer 6.5"; exit 1; fi
# The redirector aims to solve the problem of choosing a Debian mirror.
# Read more at http://httpredir.debian.org/
@gnanet
gnanet / Hosting contract killer
Created March 28, 2016 00:13 — forked from Abuwabu/Hosting contract killer
This is an additional paragraph for the excellent Contract Killer https://gist.github.com/malarkey/4031110
Hosting
We provide hosting for our own built websites on our preferred hosting provider <hosting provider name>.
Based on their SLA we endeavor to have 99.9% uptime on our servers measured annually.
There may of course be times when the server will not be available, this can be scheduled or unscheduled.
Scheduled downtime is when we know it is going to happen and tell you about it in advance. Scheduled downtime will wherever possible, almost certainly be outside of normal office hours. We’ll do our stuff in the evening or at weekend to minimize impact on your business.
There may be very rare occasions when we need to restart the server during normal office hours and it is not possible to inform you before hand. We don’t make these decisions lightly and if this does happen we apologise.
@gnanet
gnanet / Contract Killer 3.md
Created March 28, 2016 00:12
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post