Skip to content

Instantly share code, notes, and snippets.

View Rocketeer007's full-sized avatar

Nick Price Rocketeer007

View GitHub Profile
@Rocketeer007
Rocketeer007 / react-app-nginx
Created July 22, 2018 13:43
nginx configuration for create-react-app with backend proxy
server {
listen 80;
server_name my-react-app.mydomain.com;
location / {
root /home/user/my-react-app/client/build/;
try_files $uri $uri/ @node_backend;
}
location @node_backend {
@Rocketeer007
Rocketeer007 / fix_date.py
Last active April 29, 2018 20:09 — forked from daverigby/fix_date.py
fix_date.py - corrects the received date in IMAP folders
#!/usr/bin/python
# fix_date.py - corrects the received date in IMAP folders.
# Description:
# When moving mail between IMAP servers, the received date can become
# reset to the date when the message was added to the new server. This
# script attempts to fix this by setting the received date to the date the
# message was sent.
# Usage:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Input\Settings\proc_1\loc_0809\im_1]
"EmojiSuggestion"=dword:00000001
"EmojiTranslation"=dword:00000001
"EnableExpressiveInputEmojiInputHistory"=dword:00000001
"EnableExpressiveInputShellHotkey"=dword:00000001
"EnableExpressiveInputSystemInitiated"=dword:00000001
"EnableExpressiveInputUserInitiated"=dword:00000001
"EnableHwkbTextPrediction"=dword:00000000
@Rocketeer007
Rocketeer007 / pom.xml
Created March 12, 2017 14:41
Jacoco Aggregate Reports
<project>
...
<dependencies>
<dependency>
<groupId>maven-demo</groupId>
<artifactId>module1</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>maven-demo</groupId>
@Rocketeer007
Rocketeer007 / pom.xml
Created March 12, 2017 14:14
Surefire and Failsafe Aggregate Reports
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
<reportSets>
<reportSet>
@Rocketeer007
Rocketeer007 / pom.xml
Last active March 12, 2017 13:51
Surefire, Failsafe and Jacoco reports for sub-modules with Code Cross-Reference
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<reportSets>
<reportSet>
@Rocketeer007
Rocketeer007 / pom.xml
Created March 12, 2017 13:37
Surefire, Failsafe and Jacoco configuration for build
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-prepare-agent</id>
@Rocketeer007
Rocketeer007 / waitfornotify.sh
Created November 25, 2016 09:56
Wait for a process to start, then notify on start and stop of that process
#!/bin/sh
trap "" HUP
PROCESS_NAME=$1
shift
MESSAGE=$*
waitfor.sh "${PROCESS_NAME}" ${MESSAGE} has started
@Rocketeer007
Rocketeer007 / waitfor.sh
Created November 25, 2016 09:55
Wait until a process matching a particular string starts, then send a notification
#!/bin/sh
trap "" HUP
PROCESS_NAME=$1
shift
MESSAGE=$*
until ps -fu $USER | grep "${PROCESS_NAME}" | grep -v grep | grep -v $0 | grep -v waitfor >/dev/null 2>&1; do
sleep 5
@Rocketeer007
Rocketeer007 / monitor.sh
Created November 25, 2016 09:53
Monitor a process and notify when it completes
#!/bin/sh
trap "" HUP
PID=$1
shift
MESSAGE=$*
while ps --pid ${PID} >/dev/null 2>&1; do
sleep 5