Skip to content

Instantly share code, notes, and snippets.

View sachsgit's full-sized avatar

Sachs sachsgit

View GitHub Profile
@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 / 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 / .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 / .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 / 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 / ClearCaches.bat
Last active December 12, 2022 18:43
This batch file clears out (completely) the caches for Internet Explorer, Chrome, Firefox and Microsoft Edge browsers, and Java Cache.
@ECHO OFF
:: REM URL: http://stackoverflow.com/questions/12621969/clear-cache-of-browser-by-command-line
IF NOT EXIST "%TEMP%" GOTO :SkipTemp
ERASE "%TEMP%\*.*" /F /S /Q
FOR /D %%i IN ("%TEMP%\*") DO RMDIR /S /Q "%%i"
:SkipTemp
IF NOT EXIST "%TMP%" GOTO :SkipTmp
ERASE "%TMP%\*.*" /F /S /Q
FOR /D %%i IN ("%TMP%\*") DO RMDIR /S /Q "%%i"
@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