Skip to content

Instantly share code, notes, and snippets.

Jeff Levesque jeff1evesque

Block or report user

Report or block jeff1evesque

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
View addkey.pp
###
### create_key.pp, create ssh key(s).
###
class sshkey::create_key {
$directory_path = '/etc/puppetlabs/puppetserver/ssh'
$ssh_keys = $::sshkey::params::ssh_keys
$ssh_keys.each |Integer $index, String $value| {
$ssh_key = basename($value, '.git')
$certs = [
"${directory_path}/${ssh_key}",
@jeff1evesque
jeff1evesque / Vagrantfile
Created Jan 15, 2019
Centos7x: guest additions workaround
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
##
## variables
##
## Note: multiple vagrant plugins follow the following syntax:
##
## required_plugins = %w(plugin1 plugin2 plugin3)
##
View install_puppet_agent
#!/bin/bash
##
## variables
##
## @HOST_FQDN, this needs match the result of running the 'hostnamectl' command
## from the environment running the puppetserver / puppetmaster.
##
## @HOST_IP, address that corresponds to the puppetserver.
##
View docker
## login
docker login
## update base
docker build -f dockerfile/base.dockerfile -t jeff1evesque/ml-base:0.8 .
docker push jeff1evesque/ml-base:0.8
## update mongodb
docker build -f dockerfile/mongodb.dockerfile -t jeff1evesque/ml-mongodb:0.8 .
docker push jeff1evesque/ml-mongodb:0.8
@jeff1evesque
jeff1evesque / change_context.txt
Last active Oct 25, 2017
Selinux change context
View change_context.txt
## immediate changes
chcon -Rv --type=httpd_sys_content_t file-name
## persistent changes
semanage fcontext -a -t httpd_sys_script_exec_t 'docroot(/.*)?'
restorecon -RFv docroot/
@jeff1evesque
jeff1evesque / git-commit-comments
Last active Jun 14, 2018
Change git comment character from '#' to ';'
View git-commit-comments
git config core.commentChar ';'
View metadata.json
{
"name": "jeff1evesque/trusty64",
"description": "Ubuntu 14.04 LTS 64Bit",
"versions": [
{
"version": "1.0.0",
"providers": [
{
"name": "virtualbox",
"url": "https://atlas.hashicorp.com/jeff1evesque/boxes/trusty64/versions/1.0.0/providers/virtualbox.box",
@jeff1evesque
jeff1evesque / validate-puppet.sh
Last active Aug 1, 2016
Validate puppet variables via 'puppet apply'
View validate-puppet.sh
vagrant@vagrant-ubuntu-trusty-64:~$ puppet apply -e 'notify { "something@%/ok.*": }'
Notice: Compiled catalog for vagrant-ubuntu-trusty-64.home in environment produc
tion in 0.03 seconds
Notice: something@%/ok.*
Notice: /Stage[main]/Main/Notify[something@%/ok.*]/message: defined 'message' as
'something@%/ok.*'
Notice: Applied catalog in 0.01 seconds
@jeff1evesque
jeff1evesque / ssh-into-docker.sh
Last active Jul 10, 2016
SSH into docker container
View ssh-into-docker.sh
# step 1: build container
$ docker build -f docker/redis.dockerfile -t <image-alias> .
# step 2: run container
$ docker run -dt --name <container-name> <image-alias>
# step 3: unix based
$ docker exec -it <container-name> bash
root@cdaa90138643:/#
@jeff1evesque
jeff1evesque / interactive-docker.sh
Last active Jul 5, 2016
Query database docker container via interactive bash
View interactive-docker.sh
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\Jeff\.docker\machine\cache\boot2docker.iso to C:\User
s\Jeff\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to configure a dhcp server. Somet
imes, such confirmation window is minimized in the taskbar.
You can’t perform that action at this time.