Skip to content

Instantly share code, notes, and snippets.

View mchenetz's full-sized avatar

Michael Chenetz mchenetz

View GitHub Profile
http --verify=no -a [user:pw] https://192.168.2.104:24573/cloudcenter-ccm-backend/api/v1/user/keys --print=b | jq .sshKeys[0].key
@mchenetz
mchenetz / extract-uimage.sh
Created February 6, 2019 15:47 — forked from adamvr/extract-uimage.sh
Script for extracting a uimage
#!/bin/sh
#
# Copyright (C) 2010 Matthias Buecher (http://www.maddes.net/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/gpl-2.0.txt
@mchenetz
mchenetz / Dockerfile
Last active April 6, 2017 20:59
Django Dockerfile
FROM codenvy/python34
RUN sudo pip install django
EXPOSE 8000
WORKDIR /projects
CMD tailf /dev/null
@mchenetz
mchenetz / mixins.py
Created March 6, 2017 13:51 — forked from melvyn-sopacua/mixins.py
Display update form in a modal with initial data
from django.views import generic
from django.db.models.base import Model
from collections import OrderedDict
from django.forms import BaseForm
from django.core.validators import RegexValidator
__all__ = (
'AdditionalFormsMixin',
)
@mchenetz
mchenetz / foremancentos7.sh
Last active January 24, 2017 02:57
theforeman-centos7
#!/bin/bash
. /usr/local/osmosix/etc/userenv
echo "$CliqrTier_theforeman_IP theforeman.fhmc.local theforeman" | sudo tee -a /etc/hosts
sudo hostnamectl set-hostname theforeman
sudo systemctl restart systemd-hostnamed
sudo yum -y install https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
sudo yum -y install epel-release
sudo yum -y install foreman
@mchenetz
mchenetz / theforeman.sh
Last active January 21, 2017 15:46
cliqr-theforeman-install
#!/bin/bash
apt-get -y install ca-certificates
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
dpkg -i puppetlabs-release-pc1-trusty.deb
echo "deb http://deb.theforeman.org/ trusty 1.14" > /etc/apt/sources.list.d/foreman.list
echo "deb http://deb.theforeman.org/ plugins 1.14" >> /etc/apt/sources.list.d/foreman.list
apt-get -y install ca-certificates
wget -q https://deb.theforeman.org/pubkey.gpg -O- | apt-key add -
apt-get update && apt-get -y install foreman-installer
foreman-installer
Required inputs ['vsphere_host', 'agent_private_key_path'] were not specified - expected inputs: ['dns_servers', 'pip_source_rpm_url', 'ldap_server', 'skip_checksum_validation', 'cli_source_url', 'external_network_switch_distributed', 'manager_resources_package', 'agent_rest_cert_path', 'rabbitmq_events_queue_length_limit', 'grafana_source_url', 'ldap_domain', 'rest_service_source_url', 'rabbitmq_cert_public', 'ldap_dn_extra', 'elasticsearch_endpoint_ip', 'server_name', 'ldap_password', 'consul_package_url', 'syncthing_package_url', 'plugins_common_source_url', 'vsphere_resource_pool_name', 'nginx_source_url', 'ssh_user', 'repmgr_rpm_url', 'postgresql95_libs_rpm_url', 'rest_service_gunicorn_worker_count', 'elasticsearch_clustering_enabled', 'elasticsearch_endpoint_port', 'rest_client_source_url', 'rabbitmq_logs_queue_length_limit', 'external_network_ip', 'rabbitmq_metrics_queue_message_ttl', 'ignore_bootstrap_validations', 'elasticsearch_heap_size', 'pgbouncer_rpm_url', 'postgresql_password', 'postgresql95_co
@mchenetz
mchenetz / meraki_strongswan_notes.md
Created August 25, 2016 15:22 — forked from psanford/meraki_strongswan_notes.md
connect to meraki client vpn from strongswan (ubuntu 16.04 edition)

These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.

Install the following packages:

apt-get install -y strongswan xl2tpd

Configure strong swan

input {
http_poller {
urls => {
"meraki_traffic" => {
method => get
url => "https://dashboard.meraki.com/api/v0/networks/ENTER NETWORK ID/traffic?timespan=7200"
headers => {
Accept => "application/json"
"x-cisco-meraki-api-key" => "ENTER API KEY"
}
FROM ubuntu:16.04
MAINTAINER mchenetz@gmail.com
RUN echo 'Starting latest Ubuntu' && \
apt-get update && \
apt-get -y install sudo && \
apt-get install -y wget && \
echo 'getting puppet for Xenial' && \
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb && \
echo 'installing puppet repo' && \
sudo dpkg -i puppetlabs-release-pc1-xenial.deb && \