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 / monitor.sh
Last active April 9, 2020 02:28
Monitors a Maven coordinate and displays a notification in the UI when it's available - Tested on Fedora only
#!/bin/bash
: ${1:?"groupId is required"}
: ${2:?"artifactId is required"}
: ${3:?"version is required"}
# eg. ~/monitor.sh org.wildfly.swarm spi 1.0.8.Final
GROUP_ID=${1//.//}
ARTIFACT_ID=$2
VERSION=$3
@gastaldi
gastaldi / App.java
Last active July 1, 2016 21:07
Changes in Swarm
// This is the class inside the application
public class App implements SwarmCallback {
public static void main(String[] args) {
// Swarm.run will do the dirty job of initializing a JBoss Modules module and callback the methods defined in App
Swarm.run(new App(),args);
}
@Override
public void deploy(Swarm swarm) {
@gastaldi
gastaldi / microservice.fsh
Last active May 26, 2022 19:10
JBoss Forge Script to create a WildFly Swarm Microservice and configuring as a KeyCloak client
#Install the required plugins
addon-install-from-git --url https://github.com/forge/wildfly-swarm-addon.git
addon-install-from-git --url https://github.com/forge/keycloak-addon.git
# Create the project and configure the WildFly Swarm maven plugin
project-new --named demo --stack JAVA_EE_7 --type wildfly-swarm
# Create the JPA entity
jpa-new-entity --named Customer
@mrkpatchaa
mrkpatchaa / README.md
Last active May 22, 2024 05:49
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.

@maxim
maxim / task.yml
Created June 12, 2014 11:09
Adding github to known_hosts with ansible
- name: ensure github.com is a known host
lineinfile:
dest: /root/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"
@aslakknutsen
aslakknutsen / start_testing_java8_today.asciidoc
Last active May 10, 2024 20:15
Example of how to use both JDK 7 and JDK 8 in one build.

JDK 8 Released

Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?

It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.

The Test Suite to the rescue

The Maven compiler plugin run in two separate lifecycles, compile and testCompile. Those can be configured separately.

@mojavelinux
mojavelinux / deck.js-introduction.adoc
Last active February 9, 2016 21:55
deck.js introduction slide deck represented in AsciiDoc (using Asciidoctor shorthand notation)

Getting Started with deck.js

@gastaldi
gastaldi / update-all.sh
Last active July 12, 2023 20:30
Bash Script to update all the needed repositories from Forge 2.x (and Forge 1)
#!/bin/sh
#echo Updating Aesh ...
#cd ~/workspace/aesh && git pull && mvn clean install -DskipTests;
echo Updating Furnace...
cd ~/workspace/furnace-parent && git pull && mvn clean install -DskipTests;
echo Updating Furnace CDI ...
cd ~/workspace/furnace-cdi && git pull && mvn clean install -DskipTests;
echo Updating Furnace Simple...
cd ~/workspace/furnace-simple && git pull && mvn clean install -DskipTests;
echo Updating Forge 2.x ...
@vshank77
vshank77 / davfs2.conf
Created June 28, 2012 18:03
Mounting webdav for cloudbees
use_locks 0
ask_auth 1
if_match_bug 1
@peteroyle
peteroyle / gist:969969
Created May 13, 2011 04:28
SeamReports Example Usage
@Qualifier
public @interface Selected {
}
@RequestScoped
public class ReportOptions {
public String reportName;
public String format;