Update Remote Git Urls in A Folder That Contains Many Repos

#!/bin/bash

function change_remote_url() {
cd $1;
if [ -d .git ]; then
	folder_name=$(basename "$(pwd)")
	echo "$folder_name"
	new_remote_url="https://github.com/ORG_NAME/$folder_name.git"
	echo "$new_remote_url"
  	echo "is open and git change_remote_url operation is started";
	git remote set-url origin "$new_remote_url"
    echo "git change_remote_url operation is end";
fi
}

function walk_dir () {
    for pathname in "$1"/*; do
        if [ -d "$pathname" ]; then
		        case "$pathname" in *.git|*.idea|*.mvn|*.settings|*.vscode|*dist|*node_modules|*target)
				;;
				*)
				change_remote_url "$pathname"
				#printf '%s\n' "$pathname"
				walk_dir "$pathname"
            esac
        fi
    done
}


walk_dir "LOCAL_URL"

echo "Remote URLs updated successfully."

Docker Problem at Windows

Error while starting docker on windows:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 92
at Docker.Actions.<>c__DisplayClass19_0.b__0() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 74
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59

Solution:

Open power shell:

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

 Also set environment veriables set DOCKER_CERT_PATH=%USERPROFILE%\.docker\machine\machines\default
 set DOCKER_HOST=tcp://192.168.99.100:2376
 set DOCKER_MACHINE_NAME=default
 set DOCKER_TLS_VERIFY=1

Add Unit Test Case for Private Constructor

@Test
public void constructorTestWhenTestingPrivateConstructorThenValidateConstructorIsPrivate() {
  try {
    Constructor exceptionCodeMessageConstantsConstructor = ExceptionCodeMessageConstants.class.getDeclaredConstructor();
    assertTrue(Modifier.isPrivate(exceptionCodeMessageConstantsConstructor.getModifiers()));
    exceptionCodeMessageConstantsConstructor.setAccessible(true);
    exceptionCodeMessageConstantsConstructor.newInstance();
  } catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
    LoggerFactory.getLogger(this.getClass()).error(e.getMessage(), e);
    fail(e.getMessage());
  }
}

TNS:listener does not currently know of SID given in connect descriptor Vendor code 12505

Bugun windows a update geldikten sonra her ne hikmetse oracle çalışmamaya başladı. Şöyle bir hata veriyordu:

An error was encountered performing the requested operation: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor Vendor code 12505

Sorunu şu şekilde çözdüm:

Öncelikle Oracle servislerininden bir tanesi çalışmıyordu onu çalıştırdım:

Control Panel -> Administrative Tools -> Services

OracleXETNSListener OracleXEClrAgent OracleServiceXE servislerini başlattım.

Daha sonra şu komutları çalıştırdım.

C:\>sqlplus / as sysdba
SQL>shutdown immediate
SQL>startup

Sonrasında hata yine devam etti. Bu sefer listener.ora ya XE yi ekledim. Bendeki path:

C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora

(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)

Bu değişikliğin aktif olması için listenerın yeniden başlatılması gerekiyor.

CMD yi admin olarak açtıktan sonra
lsnrctl stop

lsnrctl start

lsnrctl reload

Bende şuan çalışıyor.

Diye Diye

Koduma PR açtım
Review et diye diye
Divane bug dan kaçtım
Debug ede ede

Classlar yüzüme küstü
Sonarlar özüme küstü
Merge ler yüzüme küstü
Kör diye diye

Mehmet düştüm ağladım
Release de coştum çağladım
Çok juniora bel bağladım
Craftsman diye diye

Drop All Tables and Sequences

BEGIN

–Bye Sequences!
FOR i IN (SELECT us.sequence_name
FROM USER_SEQUENCES us) LOOP
EXECUTE IMMEDIATE ‘drop sequence ‘|| i.sequence_name ||”;
END LOOP;

–Bye Tables!
FOR i IN (SELECT ut.table_name
FROM USER_TABLES ut) LOOP
EXECUTE IMMEDIATE ‘drop table ‘|| i.table_name ||’ CASCADE CONSTRAINTS ‘;
END LOOP;

END;