Skip to content

Instantly share code, notes, and snippets.


Daniel Adeniji DanielAdeniji

View GitHub Profile
DanielAdeniji / DOSBatch.getDrive.cmd
Created Jul 9, 2022
DOS - Batch - Get Drive Letter
View DOSBatch.getDrive.cmd
@echo off
rem Get current drive letter in CMD
rem get contextual information
set "_contextualDrive=%cd:~0,2%"
DanielAdeniji / TransactSQLFormatFunction.sql
Created Jun 16, 2022
Using Transact SQL Format Function
View TransactSQLFormatFunction.sql
set nocount on
declare @tblPerson table
[id] int not null
, [name] varchar(200) not null
View person.txt
john smith los angeles CA 90001
larry summers new york-city NY 10001
twilla jacobs cincinnati OH 45201
andy johnson miami FL 33101
tanya wilson philadephia PA 19019
DanielAdeniji / stringCollectionDump.cs
Created Jun 1, 2022
Printing out the contents of a string collection
View stringCollectionDump.cs
using System.IO;
using System;
using System.Linq;
class Program
enum enumConversionChoice
View personListSortedByAge.ps1
Set-StrictMode -Version Latest
Declare Person Object
class person
[string] $name;
DanielAdeniji / repeatChar.js
Last active May 15, 2022
repeat Character in Node JS
View repeatChar.js
Function:- repeatChar
function repeatChar(ch, count)
Declare buffer as an array
var buffer = [];
var str = "";
View repeatChar.powershell.function.eitherOr.ps1
[string] $title;
[char] $ch;
[int] $len=0;
[string] $filler = "";
[boolean] $bCallFunctionWithComma = $false;
function repeatChar([char] $ch,[int] $n)
[String] $str = "";
View dos.batch.remarkStatement.specialChars.original.cmd
rem Adding Comments
IF %ERRORLEVEL% NEQ 0 Echo errorlevel is %ERRORLEVEL%
View compile.cmd
set "jar_log4j_version=2.17.1"
set "jar_log4j_explicit=lib/log4j/*"
set "jar_log4j_implicit=lib/log4j/log4j-api-%jar_log4j_version%.jar;lib/log4j/log4j-core-%jar_log4j_version%.jar;lib/log4j/log4j-1.2-api-%jar_log4j_version%.jar"
set "jar_log4j=%jar_log4j_implicit%"
public class helloWorld
public static void main(String[] args)
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");