Skip to content

Instantly share code, notes, and snippets.

View DanielAdeniji's full-sized avatar

Daniel Adeniji DanielAdeniji

View GitHub Profile
@DanielAdeniji
DanielAdeniji / TransactSQLFormatFunction.sql
Created June 16, 2022 15:19
Using Transact SQL Format Function
set nocount on
go
declare @tblPerson table
(
[id] int not null
identity(1,1)
, [name] varchar(200) not null
@DanielAdeniji
DanielAdeniji / person.txt
Last active June 8, 2022 22:13
person.txt
john smith jsmith@nobody.com los angeles CA 90001
larry summers lsummers@treasury.gov new york-city NY 10001
twilla jacobs tjacobs@cincy.com cincinnati OH 45201
andy johnson ajohnson@yahoo.com miami FL 33101
tanya wilson twilson@gmail.com philadephia PA 19019
@DanielAdeniji
DanielAdeniji / stringCollectionDump.cs
Created June 1, 2022 12:16
Printing out the contents of a string collection
using System.IO;
using System;
using System.Linq;
class Program
{
enum enumConversionChoice
{
convertToStringArray
Set-StrictMode -Version Latest
<#
Declare Person Object
#>
class person
{
[string] $name;
@DanielAdeniji
DanielAdeniji / repeatChar.js
Last active May 15, 2022 02:49
repeat Character in Node JS
/*
Function:- repeatChar
*/
function repeatChar(ch, count)
{
/*
Declare buffer as an array
*/
var buffer = [];
var str = "";
@DanielAdeniji
DanielAdeniji / repeatChar.powershell.function.eitherOr.ps1
Created May 5, 2022 18:47
Calling Powershell function with commas
[string] $title;
[char] $ch;
[int] $len=0;
[string] $filler = "";
[boolean] $bCallFunctionWithComma = $false;
function repeatChar([char] $ch,[int] $n)
{
[String] $str = "";
rem Adding Comments
rem https://www.nobody.com/?a=1
IF %ERRORLEVEL% NEQ 0 Echo errorlevel is %ERRORLEVEL%
@DanielAdeniji
DanielAdeniji / compile.cmd
Last active January 3, 2022 00:37
helloLog4J
setlocal
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%"
@DanielAdeniji
DanielAdeniji / helloWorld.java
Last active January 1, 2022 18:26
helloWorldInJava
public class helloWorld
{
public static void main(String[] args)
{
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}
@DanielAdeniji
DanielAdeniji / helloWorldInRust.rs
Created June 6, 2021 20:37
Hello World in Rust
fn main()
{
println!("Hello, world!");
}