Skip to content

Instantly share code, notes, and snippets.

View Fabccc's full-sized avatar

Fabien C. Fabccc

View GitHub Profile
@Fabccc
Fabccc / profile.ps1
Created July 9, 2023 19:29
Powershell profile quick setup
New-Alias l ls
New-Alias grep findstr
New-Alias wget Invoke-WebRequest
# New-Alias python python.bat
# $Folders = "".Split("\")
# $LastElement = $Folders.Count - 1
# $CmdPromptCurrentFolder = ""
# for ($i = 0; $i -lt $LastElement; $i++) {
# $Folder = $Folders[$i]
@Fabccc
Fabccc / ByteStack.java
Last active February 13, 2022 17:36
Stack of primitive byte type in Java for better performances
package net.omny.utils;
import java.util.Arrays;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import java.util.Objects;
public static String getSoundexCode(String s){
char[] x = s.toUpperCase().toCharArray();
char firstLetter = x[0];
for (int i = 0; i < x.length; i++) {
switch (x[i]) {
case 'B':
case 'F':
case 'P':
case 'V': {
x[i] = '1';