Skip to content

Instantly share code, notes, and snippets.

View gayashanbc's full-sized avatar
:octocat:
Nothing is true, everything is permitted...

Gayashan Bombuwala gayashanbc

:octocat:
Nothing is true, everything is permitted...
View GitHub Profile
@trandaison
trandaison / starUML.md
Last active November 14, 2024 00:05
Get full version of StarUML
@oliverspryn
oliverspryn / .zshrc
Created November 7, 2018 20:08
Configures the shell to utilize a preinstalled Git completion script
# Load Git completion
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
autoload -Uz compinit && compinit
@mujahidk
mujahidk / oracle-plsql-measure-time.sql
Created January 29, 2019 18:24
Oracle PL/SQL block to run a query multiple times and measure time.
SET TIMING ON
DECLARE
START_TIME PLS_INTEGER;
COUNT_ROW NUMBER;
BEGIN
FOR I IN 1..10 LOOP
START_TIME := DBMS_UTILITY.GET_TIME();
SELECT COUNT(*) INTO COUNT_ROW FROM (SELECT * FROM PERSON ORDER BY LASTNAME ASC) WHERE ROWNUM <= 50;
DBMS_OUTPUT.PUT_LINE('Selected ' || COUNT_ROW || ' in ' || (DBMS_UTILITY.GET_TIME() - START_TIME) || '/100 seconds');
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active October 31, 2024 20:59
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@darwinsubramaniam
darwinsubramaniam / forRootAndForFeature.md
Last active January 31, 2024 08:37
The Explaination of forRoot and ForFeature

ForRoot

This is useful when the registerAs is required across, so it is best to use it in the AppModule

import databaseConfig from './config/database.config';
@Module({
  imports: [
    ConfigModule.forRoot({
      load: [databaseConfig],
 }),
@RafaelWO
RafaelWO / awc_ecr_stats.sh
Last active November 5, 2024 16:32
AWS: Calculate the size of all ECR repositories
repos=""
sizes=""
name_lens=""
# Check if user is logged in
if ! aws sts get-caller-identity &> /dev/null; then
echo "ERROR: Seems like your SSO session is invalid. Please run"
printf "\n $ aws sso login\n\n"
echo "before you run the script."
exit 1