Skip to content

Instantly share code, notes, and snippets.

View gastaldi's full-sized avatar
🏠
Working from home

George Gastaldi gastaldi

🏠
Working from home
View GitHub Profile
@gastaldi
gastaldi / delete_github_repos.sh
Last active May 24, 2018 14:35
Delete all github repositories
#!/usr/bin/env bash
#your github token
TOKEN=xxxx
echo The following repositories will be deleted:
http https://api.github.com/user/repos "Authorization:token $TOKEN" per_page==100 type==owner | jq '.[].full_name'
read -p "Continue (y/n)?" CONT
if [ "$CONT" = "y" ]; then
echo Deleting repositories
package io.thorntail.condition.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation which may be placed upon a CDI component to conditionally veto it if a class is not present.
@gastaldi
gastaldi / Requests.java
Last active April 19, 2018 12:41
executeAndMapAsync
package io.fabric8.launcher.base.http;
import java.io.IOException;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
import java.util.function.Function;
import javax.annotation.Nullable;
package io.fabric8.launcher.web.endpoints;
import java.io.IOException;
import java.io.PrintWriter;
import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.json.Json;
@gastaldi
gastaldi / MissionControlEventTest.java
Created November 20, 2017 19:57
Testing event steps in MissionControl
package io.fabric8.launcher.core.impl;
import java.io.File;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Any;
import javax.inject.Inject;
import javax.inject.Singleton;
import io.fabric8.launcher.core.api.CreateProjectile;
Subject: "Weekly Status : <Name> : <Date>"
Blockers/Risks/Asks For Others
* What is keeping you from getting work done (note: status report is not a valid entry) :-)
* What risks are you seeing coming up, what might keep from getting work done
* Specific items that you need from your manager or others on the team
Accomplishments, And Key Updates:
* What did you complete this week?
@gastaldi
gastaldi / Minishift.txt
Created March 16, 2017 14:07
Instructions on how to install backend and frontend in Minishift
backend: oc process -f openshift/openshift/obsidian-generator-backend.app.yaml | oc apply -f -
frontend: oc process -f openshift/openshift/obsidian-generator-backend.app.yaml BACKEND_URI=generator-backend-YOUR_PROJECT.YOUR_CLUSTER_URL | oc apply -f -
Useful commands:
To get the IP: `minishift ip`
To deploy backend again: oc deploy generator-backend --latest
@gastaldi
gastaldi / Dockerfile
Last active March 15, 2017 18:14
Catapult Dockerfile
FROM jboss/wildfly:10.1.0.Final
MAINTAINER George Gastaldi<ggastald@redhat.com>
# Set the CATAPULT_VERSION env variable
ENV CATAPULT_VERSION 1.0.0-SNAPSHOT
ADD https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=snapshots&g=org.kontinuity.catapult&a=catapult-web&v=$CATAPULT_VERSION&e=war /opt/jboss/wildfly/standalone/deployments/catapult.war
USER root
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.jboss.forge.addon.swarm.config;
import java.io.IOException;
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.jboss.forge.addon.swarm.config;
import java.io.IOException;