Skip to content

Instantly share code, notes, and snippets.

View sachsgit's full-sized avatar

Sachs sachsgit

View GitHub Profile
@sachsgit
sachsgit / AddCertToJVM.bat
Created December 26, 2019 16:45
A batch file takes cert with underscores for periods and add it to cacerts file. The alias is generated from the file name converting underscore to period, and removing .cer
@ECHO OFF
:: REM ::
SET CERTFILE=%1
IF NOT EXIST %CERTFILE% GOTO :MissingCert
FOR /F %%i IN ("%CERTFILE%") DO @SET BASE=%%~ni
SET ALIASNAME=%BASE:_=.%
IF "x%CERTFILE%x" == "xx" GOTO :MissingCert
SET KEYTOOL="%JAVA_HOME%\bin\keytool.exe"
SET KEYSTOREFILE="%JAVA_HOME%\jre\lib\security\cacerts"
IF NOT EXIST %KEYSTOREFILE% SET KEYSTOREFILE="%JAVA_HOME%\lib\security\cacerts"
@sachsgit
sachsgit / .project
Created January 20, 2020 00:27
Generic Maven Java Eclipse ".project file"
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>${projectName}</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
@sachsgit
sachsgit / NumberToWord
Created March 3, 2021 15:09
Java Code To Convert Integer To Word-Form
package utilities.common;
import java.text.NumberFormat;
import java.util.Random;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.google.common.base.Joiner;
@sachsgit
sachsgit / .bashrc
Created October 25, 2021 22:23
Standard BASH RC file
#!/bin/bash
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
if [ -f /etc/profile ]; then
@sachsgit
sachsgit / .bash_profile
Created October 25, 2021 22:25
Common BASH Profile file
# generated by Git for Windows
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
trap 'test -n "$SSH_AGENT_PID" && eval `/usr/bin/ssh-agent -k`' 0
@sachsgit
sachsgit / myTorahReading.pm
Last active October 25, 2021 22:37
This PERL module contains mapping for English->Hebrew of the months, Torah portion info, and other Jewish I have needed as I go
package myTorahReading;
use Exporter;
use charnames ();
use Tie::IxHash;
#URL: http://perldoc.perl.org/perluniintro.html
#URL: https://en.wikipedia.org/wiki/Unicode_and_HTML_for_the_Hebrew_alphabet
our @EXPORT = qw ( $alef $bet $gimel $dalet $he $vav $zayin $het $tet
$yod $final_kaf $kaf $lamed $final_mem $mem $final_nun $nun $samekh
@sachsgit
sachsgit / Timesheet Worksheet Macros
Last active October 27, 2021 17:52
Macros for Dealing with Timesheet
Option Explicit
Sub CreatePayPeriod()
Dim colStart, colLast, colIndex, colSum
Dim colSumLetter, colLetter, colStartLetter, colLastLetter, colSecondWeekLetter
Dim rowDate, rowSum, intWeekend, rowDay, rowHourStart, rowHourLast, rowAccum, rowLast
Dim rowSecondWeekSum, rowSecondWeekAccum, secondWeek
Dim dtStart, dtCurrent, dtLast
Dim i
Dim colRows As Collection
@sachsgit
sachsgit / .classpath
Last active November 9, 2021 16:44
Generic classpath for Java/Maven in Eclipse
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
@sachsgit
sachsgit / CreateMavenProject.bat
Created November 9, 2021 20:18
Batch File to Create a Maven Project Param1 is Group Id and Param2 is Artifact ID
@ECHO OFF
SET GROUPID=%1
SET ARTIFACTID=%2
mvn archetype:generate^
-DinteractiveMode=false^
-DarchetypeArtifactId=maven-archetype-quickstart^
-DgroupId=%GROUPID%^
-DartifactId=%ARTIFACTID%
@sachsgit
sachsgit / .gitconfig
Created November 17, 2021 16:01
My Git Config in $HOME directory
[color]
ui = auto
[core]
autocrlf = false
longpaths = true
[credential]
helper = wincred
useHttpPath = true
[http]
sslVerify = true