Skip to content

Instantly share code, notes, and snippets.

View bparry02's full-sized avatar

Bryan Parry bparry02

  • Red Hat, Inc.
  • Washington, D.C
View GitHub Profile
@bparry02
bparry02 / split-certs.sh
Last active August 31, 2023 16:40
Break a combined pem file into parts
csplit -s -z -f mycerts- mycerts.pem '/-----BEGIN/' '{*}'
@bparry02
bparry02 / config
Created January 13, 2023 15:22
Example SSH config for cloud envrionments
# name this file ~/.ssh/config, or ~/.ssh/config-mycluster and symlink to ~/.ssh/config
Host *.[fqdn]
StrictHostKeyChecking no
CheckHostIP no
ServerAliveInterval 30
Host myhostname*
StrictHostKeyChecking no
CheckHostIP no
@bparry02
bparry02 / tmux-commands.adoc
Last active June 16, 2023 16:52
Some helpful tmux commands
@bparry02
bparry02 / parse_tag.py
Created February 8, 2021 14:10 — forked from ashcrow/parse_tag.py
Quick and dirty parsing of tags
#!/usr/bin/env python
import json
import sys
def main():
for tag in json.loads(sys.stdin.read())['RepoTags']:
# Do your commands here
print(tag)
@bparry02
bparry02 / linux-tips.txt
Created January 3, 2021 18:17
Linux Tips and Keyboard Shortcuts
* Hold Alt to see Suspend
* Ctrl + Alt + Up/Down arrow - switch workspaces
* Windows/Super key: App overview
* Super + m: Open Message tray
* Alt + . : Add command args
* Ctrl + u Ctrl + k : clear from cursor to begin/end
* Ctrl + w: delete previous word
@bparry02
bparry02 / find-class-in-jar.sh
Created April 20, 2017 02:43
Search for a Java class name in JARs in all subdirectories
#!/bin/sh
# find-class-in-jar.sh [class-name]
grep $1 `find . \-name '*.jar'`
@echo off
set PUTTY="C:\Path\to\putty\ProgramFilesx86\Putty\putty.exe"
start /B "Starting PuTTY" %PUTTY% -load "profile-name"
timeout /T 1
start /B "Starting PuTTY" %PUTTY% -load "profile-name"
timeout /T 1
@bparry02
bparry02 / pom.xml
Last active August 29, 2015 14:23
jboss-as:deploy to remote server. Make sure management interface is bound to an external interface. Optionally specify host from command line instead of creating a profile via: mvn clean package jboss-as:deploy -Djboss-as.hostname=my-remote-host -Djboss-as.id=my-remote-host
<profiles>
<profile>
<id>deploy-remote</id>
<build>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${version.jboss.maven.plugin}</version>
<configuration>
@bparry02
bparry02 / JBoss-Auth-Log-Categories.txt
Created May 27, 2015 00:06
Log categories relevant to JBoss SSO authentication
org.jboss.as.web.sso
org.jboss.as.web.security
org.apache.catalina.authenticator.realm
org.jboss.security
org.jboss.as.domain.management.security
org.jboss.as.clustering.web.sso
org.infinispan.interceptors.ReplicationInterceptor
@bparry02
bparry02 / gist:f39f2901f49a9f9ce4bc
Created November 23, 2014 18:29
Infinispan close cache example
@Named
@ApplicationScoped
public class GreetingCacheManager {
@Inject
@GreetingCache
private Cache<CacheKey, String> cache;
@PreDestroy
public void closeCache() {