Skip to content

Instantly share code, notes, and snippets.

View udoyen's full-sized avatar

george udosen udoyen

View GitHub Profile
@udoyen
udoyen / alb-redirect-only.yaml
Created February 2, 2023 01:59 — forked from anabadce/alb-redirect-only.yaml
AWS CloudFormation template: ALB (Application Load Balancer) that only redirects requests (http and https) to new host, no targets
AWSTemplateFormatVersion: '2010-09-09'
Description: 'ALB Application Load Balancer for redirection only'
Parameters:
MyALBName:
Type: 'String'
Default: 'alb-redirect'
VPC:
Type: 'AWS::EC2::VPC::Id'
Default: 'vpc-********'
@udoyen
udoyen / gunicorn.py
Created November 1, 2022 11:10 — forked from HacKanCuBa/gunicorn.py
A config file of gunicorn(http://gunicorn.org/) contains fundamental configuration.
"""Gunicorn config file.
by HacKan (https://hackan.net)
Find it at: https://gist.github.com/HacKanCuBa/275bfca09d614ee9370727f5f40dab9e
Based on: https://gist.github.com/KodeKracker/6bc6a3a35dcfbc36e2b7
Changelog
=========
See revisions to access other versions of this file.
@udoyen
udoyen / odoo.conf
Created September 2, 2022 12:25 — forked from sotolucas/odoo.conf
Sample odoo.conf file
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@udoyen
udoyen / 1.mongodb-aws-setup-guide.md
Created July 11, 2022 13:51 — forked from calvinh8/1.mongodb-aws-setup-guide.md
MongoDB Setup Guide for AWS EC2 Instances with Auth Enabled

MongoDB AWS EC2 Setup Guide

You can see my latest update in my blog here https://medium.com/@calvin.hsieh/steps-to-install-mongodb-on-aws-ec2-instance-62db66981218

Credits:

Big thanks to Elad Nava and Shane Rainville for writing the above articles that allow me to conduct this guide. If by all means that I violated original post's copyright, please contact me.

[2022-02-05T13:00:22+00:00] WARN: *****************************************
[2022-02-05T13:00:22+00:00] WARN: Did not find config file: /etc/chef/client.rb. Using command line options instead.
[2022-02-05T13:00:22+00:00] WARN: *****************************************
[2022-02-05T13:00:22+00:00] DEBUG: Reading products and relationships...
[2022-02-05T13:00:22+00:00] DEBUG: Successfully read products and relationships
[2022-02-05T13:00:22+00:00] DEBUG: Searching for the following licenses: ["infra-client", "inspec"]
[2022-02-05T13:00:22+00:00] DEBUG: Found license chef_infra_client at /etc/chef/accepted_licenses/chef_infra_client
[2022-02-05T13:00:22+00:00] DEBUG: Found license inspec at /etc/chef/accepted_licenses/inspec
[2022-02-05T13:00:22+00:00] DEBUG: Missing licenses remaining: []
[2022-02-05T13:00:22+00:00] DEBUG: All licenses present
enerated at 2022-02-05 12:44:35 +0000
Mixlib::ShellOut::ShellCommandFailed: service[apache2] (webserver::install_apache line 8) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/systemctl --system start apache2 ----
STDOUT:
STDERR: Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
---- End output of /usr/bin/systemctl --system start apache2 ----
Ran /usr/bin/systemctl --system start apache2 returned 1
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/mixlib-shellout-3.2.0/lib/mixlib/shellout.rb:300:in `invalid!'
/opt/chefdk/embedded/lib/ruby/gems/2.6.0/gems/mixlib-shellout-3.2.0/lib/mixlib/shellout.rb:287:in `error!'
@udoyen
udoyen / _vimrc
Created June 11, 2021 09:28 — forked from danwagnerco/_vimrc
A starter _vimrc file for Vim 8.0 and vim-plug on Windows 10
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
@udoyen
udoyen / kubernetes_engine_apis.py
Created May 14, 2021 10:14 — forked from DazWilkin/kubernetes_engine_apis.py
Cloud Deployment Manager & Kubernetes
def GenerateConfig(context):
"""Generate YAML resource configuration."""
endpoints = {
'-v1': 'api/v1',
'-v1beta1-apps': 'apis/apps/v1beta1',
'-v1beta1-extensions': 'apis/extensions/v1beta1'
}
resources = []
@udoyen
udoyen / generate_cluster_and_types.yaml
Created May 14, 2021 07:14 — forked from DazWilkin/generate_cluster_and_types.yaml
Cloud Deployment Manager & Kubernetes
imports:
- path: kubernetes_engine.py
- path: kubernetes_engine_apis.py
resources:
- name: cluster
type: kubernetes_engine.py
properties:
CLUSTER_NAME: [[YOUR-CLUSTER-NAME]]
CLUSTER_ZONE: [[YOUR-CLUSTER-ZONE]]
@udoyen
udoyen / kubernetes_deployment.py
Created May 14, 2021 07:10 — forked from DazWilkin/kubernetes_deployment.py
Cloud Deployment Manager & Kubernetes
def GenerateConfig(context):
"""Generate YAML resource configuration."""
cluster_types_root = '{}/kubernetes'.format(context.env['project'])
cluster_types = {
'Service': '{}-v1:/api/v1/namespaces/{{namespace}}/services'.format(cluster_types_root),
'Deployment': '{}-v1beta1-apps:/apis/apps/v1beta1/namespaces/{{namespace}}/deployments'.format(cluster_types_root)
}
name = context.properties['name']