Skip to content

Instantly share code, notes, and snippets.

View dennis1987's full-sized avatar

Dennis Mueller dennis1987

  • evoila GmbH
  • Germany
View GitHub Profile
ssh_authorized_keys:
- rancher:rancher
k3os:
data_sources:
- cdrom
dns_nameservers:
- 192.168.254.254
- 1.1.1.1
ntp_servers:
- 0.europe.pool.ntp.org
#EXTM3U
#EXTINF:0,Das Erste
rtp://@232.0.1.1:10010
#EXTINF:0,ZDF
rtp://@232.0.1.2:10020
#EXTINF:0,NDR Schleswig-Holstein
rtp://@232.0.1.5:10000
#EXTINF:0,Vodafone TV
rtp://@232.0.1.7:10000
#EXTINF:0,Infokanal
<?php
$mysqli = new mysqli("mariadb_demo", "root", "my-secret-pw", "mysql");
if ($mysqli->connect_errno) {
echo "Sorry, this website is experiencing problems.";
echo "Error: Failed to make a MySQL connection, here is why: \n";
echo "Errno: " . $mysqli->connect_errno . "\n";
echo "Error: " . $mysqli->connect_error . "\n";
exit;
}
echo "<?php phpinfo(); ?>" > index.php
@dennis1987
dennis1987 / jsonpp.py
Created January 23, 2018 13:16
Sublime JsonPrettyPrint
import sublime
import sublime_plugin
import json
import ast
class JsonPrettyPrintCommand(sublime_plugin.TextCommand):
def run(self, edit):
region_all = sublime.Region(0, self.view.size())
body = self.view.substr(region_all)
@dennis1987
dennis1987 / xmlpp.py
Created January 23, 2018 13:16
Sublime XmlPrettyPrint
import sublime
import sublime_plugin
import xml.dom.minidom
class XmlPrettyPrintCommand(sublime_plugin.TextCommand):
def run(self, edit):
region_all = sublime.Region(0, self.view.size())
body = self.view.substr(region_all)
self.view.replace(edit, region_all, xml.dom.minidom.parseString(body).toprettyxml())
import os
import time
from keystoneauth1 import loading
from keystoneauth1 import session
from novaclient import client as nova_client
from neutronclient.v2_0 import client as neutron_client
from cinderclient import client as cinder_client
from heatclient import client as heat_client
from glanceclient import client as glance_client
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Install: Execute 'pip install requests'
Run: 'python ticket_creation.py <YOUR_CONFIGURATION_FILE_HERE>'
Sample configuration file:
[server]
jira = https://jira.atlassian.net
import random
import string
length = 40
print''.join([random.SystemRandom().choice(string.ascii_letters + string.digits)
for n in range(length)
])
#!/bin/bash
initctl --version
if [ $? -ne 0 ]
then
systemctl --version
if [ $? -ne 0 ]
then
echo FAILED
exit $?
else