Skip to content

Instantly share code, notes, and snippets.

Mitch Kuppinger dpneumo

  • TPCCC
  • Arlington, TX
Block or report user

Report or block dpneumo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dpneumo
dpneumo / README
Last active Mar 25, 2019
Create a root CA cert, an intermediate CA cert, and a server cert
View README
Copy the 4 scripts to /home/<user>
From /home/<user>:
./setup_rootca.sh
./setup_blacklakeca.sh
ipaddr=$(ip route get 8.8.8.8 | awk '{print $7}')
SUBJ_IP=$ipaddr ./stratus_server_cert.sh
This will:
@dpneumo
dpneumo / 40-redis.conf
Created Jan 2, 2019
Multi-instance Redis on one host (Centos7)
View 40-redis.conf
# Redis sysctl configuration
vm.overcommit_memory = 1
@dpneumo
dpneumo / Sessions.md
Created Nov 11, 2018
Session setup Rails 5.2
View Sessions.md

Session in Rails 5.2

  • Expiration:

    • Absolute age
      • In config/initializers/session_store.rb:
      Rails.application.config.session_store  :cookie_store,
        key: '_cirrus_session',
        expire_after: 1.days,
        ...
      
@dpneumo
dpneumo / certfiles.txt
Created Oct 22, 2018
cloud-init problem
View certfiles.txt
[loco@td2 ~]$ sudo cat certfiles.txt
[sudo] password for loco:
total 8
4 -rw-r--r--. 1 root root 2240 Oct 21 23:21 stratuscert.pem
4 -rw-r--r--. 1 root root 2496 Oct 21 23:21 blacklakecacert.pem
@dpneumo
dpneumo / Vagrantfile
Last active Oct 20, 2018
Adjust Vagrant network setup to environment at vm startup
View Vagrantfile
# Defines our Vagrant environment
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
require_relative 'bridged_interfaces'
Vagrant.configure("2") do |config|
# create wisp node
config.vm.define :wisp do |wisp|
@dpneumo
dpneumo / diff-phone_home.py.txt
Last active Oct 18, 2018
Modify cloud-init phone_home module to return a created server's public key for insertion into known_hosts. Works with cloud-iniit version 0.7.9 and later.
View diff-phone_home.py.txt
# Diff of the original cc_phone_home and the slightly modified version that supports
# including the server pub_keys in the phone_home payload
# Original: https://github.com/number5/cloud-init/blob/master/cloudinit/config/cc_phone_home.py
# A couple of typos in comment lines in the original were elided to make the diff a bit clearer.
# The Centos7 distros I am using do not provide pub_key_dsa.
# I am talking to a Rails app with phone_home.
# A dummy X-CSRF-Token: 1234567890 in the headers simplifies the code on the Rails side.
# I authenticate the phone_home payload by including a token provided in the
@dpneumo
dpneumo / Docker_User_NameSpaces_setup.md
Last active Sep 11, 2019
Setup User Namespaces for docker on RHEL/Centos 7.3
View Docker_User_NameSpaces_setup.md

On CentOS 7.3 with Kernel Version: 3.10.0


1. Allow filesystem support for namespaces: xfs partition: format with ``` mkfs.xfs -m crc=1 -n ftype=1 ``` The current CentOS 7 does this by default.



@dpneumo
dpneumo / gist:519a85ce7dfd4124ad605db37cd9a6b2
Created Apr 8, 2016
otto dev fails immediately. Output with VAGRANT_LOG=debug & OTTO_LOG=true
View gist:519a85ce7dfd4124ad605db37cd9a6b2
E:\Projects\otto-getting-started>otto dev
2016/04/08 12:50:33 [INFO] Otto version: 0.2.0 4ff0dce79f07008dcebcf34f118e8ec3dc4f96a5+CHANGES
2016/04/08 12:50:33 [DEBUG] Starting plugin: C:\otto_0.2.0_windows_386\otto.exe []string{"C:\\otto_0.2.0_windows_386\\otto.exe", "plugin-builtin", "app-ruby"}
2016/04/08 12:50:33 [DEBUG] Waiting for RPC address for: C:\otto_0.2.0_windows_386\otto.exe
2016/04/08 12:50:33 [DEBUG] otto.exe: 2016/04/08 12:50:33 [INFO] Otto version: 0.2.0 4ff0dce79f07008dcebcf34f118e8ec3dc4f96a5+CHANGES
2016/04/08 12:50:33 [DEBUG] otto.exe: 2016/04/08 12:50:33 Plugin address: tcp 127.0.0.1:10000
2016/04/08 12:50:33 [DEBUG] reading IP, cache path: E:\Projects\otto-getting-started\.otto\data\dev_ip
2016/04/08 12:50:33 [DEBUG] read ip from cache: 100.70.190.63
2016/04/08 12:50:33 [INFO] Loading app implementation for Tuple: ("ruby", "aws", "simple")
2016/04/08 12:50:33 [DEBUG] core walking app: otto-getting-started
@dpneumo
dpneumo / VBox.log
Created Mar 26, 2016
VBox log and --debug output generated during creation of a VM on a Centos 7 host
View VBox.log
VirtualBox VM 5.0.16 r105871 linux.amd64 (Mar 4 2016 13:28:08) release log
00:00:00.010976 Log opened 2016-03-26T01:09:58.550399000Z
00:00:00.010977 Build Type: release
00:00:00.010980 OS Product: Linux
00:00:00.010980 OS Release: 3.10.0-327.10.1.el7.x86_64
00:00:00.010981 OS Version: #1 SMP Tue Feb 16 17:03:50 UTC 2016
00:00:00.011094 DMI Product Name: MS-7751
00:00:00.011103 DMI Product Version: 2.0
00:00:00.011179 Host RAM: 15770MB total, 14268MB available
00:00:00.011181 Executable: /usr/lib/virtualbox/VBoxHeadless
You can’t perform that action at this time.