This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat<<EOF | |
############################################################################### | |
# Byobu f-key keybindings | |
# This configuration profile is intended to provide a useful | |
# keybindings using the keyboard's f-keys | |
# | |
# Copyright (C) 2008 Nick Barcet <[email protected]> | |
# Dustin Kirkland <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/securetty: list of terminals on which root is allowed to login. | |
# See securetty(5) and login(1). | |
# File missing from Debian 20.04+ perms should be | |
# sudo chmod 644 securetty rw/r/r/q | |
console | |
# Local X displays (allows empty passwords with pam_unix's nullok_secure) | |
:0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/securetty: list of terminals on which root is allowed to login. | |
# See securetty(5) and login(1). | |
# File missing from Debian 20.04+ | |
console | |
# Local X displays (allows empty passwords with pam_unix's nullok_secure) | |
:0 | |
:0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| |
function Make-Shim{ | |
<# | |
.SYNOPSIS | |
Creates a shim (or batch redirect) for a file that is on the PATH. | |
Makes a shim in ProgramData/choco/bin to add an exe to path | |
.DESCRIPTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
//code | |
}catch(FileNotFoundException fnfE){ | |
App.log.warning( "FileNotFoundException trying to open file: " + Paths.get( fileName ).toAbsolutePath().toString() ); | |
App.log.warning( String.valueOf( fnfE.getStackTrace() ) ); | |
}catch( IOException ioE ){ | |
App.log.warning( "IO Exception trying to open file: " + Paths.get( fileName ).toAbsolutePath().toString() ); | |
App.log.warning( String.valueOf( ioE.getStackTrace() ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A handler for printing stack traces in the Log, which doesn't like pure | |
* stack traces, just string elements. I am sure there is an easier way. | |
* | |
* @param ste - the stack trace element. | |
* @return A formatted string of the last [STACK_TRACE_LEN] stack trace | |
* elements. | |
*/ | |
public static String stackTraceConv( StackTraceElement[] ste ){ | |
StringBuilder sb = new StringBuilder(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Rather unneccessary, but delightfully interesting (and efficient) way to | |
* iterate the number at the end of a file name. At least I expect it to be | |
* efficient since it utilizes a single character buffer all the way through. | |
* | |
* It does this by using, underneath everything, javas fast array copy methods | |
* via StringBuilder, and then through slicing and reversing the string to | |
* abstract out the number at the end of a fileName. So a File Name of the | |
* format FileName1234.txt will automatically be parsed and return | |
* FileName1235.txt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generates a string the length of the argument of Random Characters from | |
* a set of given characters. Returns the String. | |
* <p> | |
* The string in the method from which characters are chosen can be edited to | |
* add characters and other special symbols. | |
* | |
* @param length - the number of Random characters to return. | |
* @return | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double x1 = 1.0, x2 = 10.0; //or float x1 = 1.0f, x2 =2.0f | |
double f = Math.random()/Math.nextDown(1.0); | |
double x = x1*(1.0 - f) + x2*f; | |
//test code | |
int c = 0; | |
while(c< 20) { | |
float x1 = 1.0f, x2 = 10.0f; | |
double f = Math.random() / Math.nextDown( 1.0 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is a test |
NewerOlder