Skip to content

Instantly share code, notes, and snippets.

View rafaeltuelho's full-sized avatar
🎯
Focusing

Rafael T. C. Soares (A.K.A Tuelho) rafaeltuelho

🎯
Focusing
  • Red Hat Inc.
  • Frisco, TX, USA
  • 04:35 (UTC -05:00)
View GitHub Profile
@hodrigohamalho
hodrigohamalho / nodejs-openshift-deploy.sh
Created April 24, 2018 20:52
NodeJS Nginx Chained Build
oc create -f https://github.com/sclorg/s2i-nodejs-container/blob/master/imagestreams/nodejs-rhel7.json -n openshift
oc new-project app-nodejs
oc new-build nodejs:8~https://github.com/hodrigohamalho/sal-frontend --name=sal-frontend-s2i
oc new-build --name=sal-frontend-nginx \
--docker-image=registry.access.redhat.com/rhscl/nginx-112-rhel7 \
--source-image=sal-frontend-s2i \
--source-image-path=/opt/app-root/src/dist/:. \
@Lasherbr
Lasherbr / named.conf
Created February 27, 2018 21:21
Configuracao /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
@Lasherbr
Lasherbr / example.com.db
Created February 27, 2018 21:20
Conf Bind Named /var/named/example.com.db
$TTL 1D
$ORIGIN example.com.
@ IN SOA example.com. root.cloudapps.example.com. (
10 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns1.example.com.
ns1 IN A 127.0.0.1
@gbraad
gbraad / README.md
Last active April 24, 2023 16:18
Minishift hostfolders

Minishift

Starting Minishift

In the previous version, when you didn't install the driver plugin, Minishift would fail with an issue.

$ minishift start
@bbrowning
bbrowning / openshift_instructions.md
Last active August 22, 2018 15:59
Running Apache OpenWhisk on OpenShift

Running Apache OpenWhisk on OpenShift

Prerequisites

These instructions assume you are using Minishift 1.0.1 or newer as your OpenShift installation.

You'll also need a wsk binary in your $PATH to interact with OpenWhisk after it's deployed. Download the latest version for your OS

@pamelafox
pamelafox / GithubClient.gs
Created May 12, 2017 20:51
Google Apps Script for committing a file to Github Repo
/* A bare-bones GithubClient, just used for commits */
function GithubClient(owner, repo, username, passwordOrToken) {
this.owner = owner;
this.repo = repo;
this.username = username;
this.passwordOrToken = passwordOrToken;
}
/*
@eloypnd
eloypnd / dnsmasq_setup_osx.md
Last active April 28, 2024 14:32
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
@rafaeltuelho
rafaeltuelho / osev3-basic-installation-steps.md
Last active May 4, 2018 14:19
OSEv3 Basic installation steps (commands)

Environment Setup

SSH Access

ssh rsoares-redhat.com@oselab-dcff.oslab.opentlc.com 
	ssh infranode00-dcff
	ssh master00-dcff
	ssh node00-dcff
@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active April 4, 2024 13:03
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
@bearfrieze
bearfrieze / comprehensions.md
Last active December 23, 2023 22:49
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.