Skip to content

Instantly share code, notes, and snippets.

View jgato's full-sized avatar
🎩
Open unlocks the world's potential

Jose Gato Luis jgato

🎩
Open unlocks the world's potential
View GitHub Profile
@jgato
jgato / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
@jgato
jgato / designer.html
Last active August 29, 2015 14:09
designer
<polymer-element name="my-element">
<template>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="core-header-panel.html"></link>
<style shim-shadowdom>
body {
font-family: sans-serif;
}
core-header-panel {
@jgato
jgato / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
#core_scroll_header_panel {
width: 590px;
@jgato
jgato / pipe_line_details
Last active August 29, 2015 14:09
pipe_line_details
<script src="http://www.polymer-project.org/platform.js"></script>
<link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html">
<link rel="import" href="http://www.polymer-project.org/components/core-scroll-header-panel/core-scroll-header-panel.html">
<link rel="import" href="https://www.polymer-project.org/components/core-scroll-header-panel/demos/sample-content.html">
<link rel="import" href="http://www.polymer-project.org/components/core-list/core-list.html">
<link rel="import" href="http://www.polymer-project.org/components/core-header-panel/core-header-panel.html">
<link rel="import" href="http://www.polymer-project.org/components/core-toolbar/core-toolbar.html">
@jgato
jgato / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<script src="http://www.polymer-project.org/platform.js"></script>
<link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html">
<link rel="import" href="http://www.polymer-project.org/components/core-scroll-header-panel/core-scroll-header-panel.html">
<link rel="import" href="https://www.polymer-project.org/components/core-scroll-header-panel/demos/sample-content.html">
<link rel="import" href="http://www.polymer-project.org/components/core-list/core-list.html">
<link rel="import" href="http://www.polymer-project.org/components/core-header-panel/core-header-panel.html">
<link rel="import" href="http://www.polymer-project.org/components/core-toolbar/core-toolbar.html">
<link rel="import" href="http://www.polymer-project.org/components/paper-tabs/paper-tabs.html">
<link rel="import" href="http://www.polymer-project.org/components/core-icon-button/core-icon-button.html">
@jgato
jgato / redfish_boot_iso.sh
Created January 24, 2022 08:42
It (HTTP) expose a local iso image and boots a BMC server with that iso using Redfish protocol
# !/bin/bash
#################################
# Very simple script that exposes a local iso image
# and boots a BMC virtual media pointing to it.
# It uses a Redfish Interface
# It uses a python simple http server to expose the image
# The server runs on port 7800
################################
# The script is very simple and lacks of making
@jgato
jgato / nginx-service-example.yaml
Created August 17, 2022 07:49
Just an nginx server with a service
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app: nginx-server
namespace: default
spec:
containers:
- name: nginx
#! /usr/bin/env bash
export iLO=192.168.
export AUTH="user:pass"
export HTTP_ISO="http:/<IP>/iso/<ISO>"
bios_status(){
curl -k -s -L -u "$AUTH" -w "%{http_code} %{url_effective}\\n" -H "Content-Type: application/json" -H "Accept: application/json" \
-X GET https://"$iLO"/redfish/v1/Systems/1/Bios
}
@jgato
jgato / delete_finalizers_cluster.sh
Last active February 1, 2023 16:38
Deleting finalizers on siteconfig deletion stuck
# delete finalizers for secrets of the bmc and the BMH
oc -n <CLUSTER_NS> get secret -o go-template='{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' \
| grep bmc \
| xargs oc patch --type=merge --type=merge -p '{"metadata": {"finalizers":null}}' -n <CLUSTER_NS> secret
oc -n <CLUSTER_NS> get bmh -o go-template='{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' \
| xargs oc patch --type=merge --type=merge -p '{"metadata": {"finalizers":null}}' -n <CLUSTER_NS> bmh