Skip to content

Instantly share code, notes, and snippets.

Jon I. russellhoff

Block or report user

Report or block russellhoff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@russellhoff
russellhoff / arrancar.sh
Created Mar 12, 2019
Make schedule_viewer.py as a Systemd service
View arrancar.sh
#!/bin/bash
schedule_viewer.py --key %yourApiKeyHere% --feed_filename /opt/gtfs/zips/gtfs.zip --port 8767
View Keybase.md

Keybase proof

I hereby claim:

  • I am russellhoff on github.
  • I am joninx88 (https://keybase.io/joninx88) on keybase.
  • I have a public key ASCP_iVcPbGNEqoSnU8m4XqIZw8I_3FmtNr75c2SClSAMAo

To claim this, I am signing this object:

@russellhoff
russellhoff / SpringResourceFileLoader.java
Created Jan 28, 2019
A helper class to load Files located under resources directory in any Spring Boot project
View SpringResourceFileLoader.java
import java.io.File;
import java.util.Optional;
import org.springframework.stereotype.Component;
@Component
public class SpringResourceFileLoader {
/**
* Obtiene un fichero desde el directorio resources
@russellhoff
russellhoff / catalina.sh
Created Aug 19, 2018
Modify Tomcat's catalina.sh to add "status" option [to be completed]
View catalina.sh
#rest of the file ...
elif [ "$1" = "configtest" ] ; then
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-classpath "\"$CLASSPATH\"" \
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
org.apache.catalina.startup.Bootstrap configtest
@russellhoff
russellhoff / DestinoDatosConfig.java
Last active May 31, 2018
Multiple datasources and their configuration in Spring Boot
View DestinoDatosConfig.java
package com.ingartek.transporte.estimat.configuration;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
View fix-wordpress-permissions.sh
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@russellhoff
russellhoff / AccountAuthenticator.java
Created Mar 22, 2018 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
View AccountAuthenticator.java
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
@russellhoff
russellhoff / wildfly-install.sh
Last active Oct 3, 2018 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 11.x as service in Linux
View wildfly-install.sh
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 11.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final
@russellhoff
russellhoff / tomcat.service
Last active Nov 28, 2017 — forked from zengxs/tomcat.service
tomcat systemd service script
View tomcat.service
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/apache-tomcat-8.5.23/bin/catalina.sh start
ExecStop=/opt/apache-tomcat-8.5.23/bin/catalina.sh stop
View database-backup.sh
#!/bin/bash
#
# Backup local databases to Amazon S3.
#
# This script takes a single argument: an S3 bucket name with optional path.
#
# Usage:
# database-backup.sh backup.example.com
# database-backup.sh backup.example.com/some/path
#
You can’t perform that action at this time.