This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isHoliday(date: Date) { | |
const holidays = { | |
MD: { | |
// Month, Day | |
'1/1': "New Year's Day", | |
'7/4': 'Independence Day', | |
'11/11': "Veteran's Day", | |
'12/25': 'Christmas Day', | |
'12/31': "New Year's Eve" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$myArray = []; | |
$arraySize = 100000; | |
for ($i = 0; $i < $arraySize; $i++) { | |
$myArray[$i] = mt_rand(1, 100); | |
} | |
$start = hrtime(true); | |
sort($myArray); | |
$end = hrtime(true); | |
$diff = ($end - $start) / 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################### | |
#Script Name : mssql_dump.sh | |
#Description : will create SQL scripts as defined by mssql-scripter | |
# and will zip backup files and store for X days (set to 30) | |
#Author : Tim Moses | |
#Github : https://github.com/tjmoses | |
#Notes : Make sure to add the appropriate MSSQL_SCRIPTER_CONNECTION_STRING | |
# for your db connection. Also, revise your target & edition | |
# sql server for the mssql-scripter command below. The zip library is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## SETTINGS | |
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands | |
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on. | |
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount | |
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g. | |
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g. | |
# 'sleep forever' or 'set dns:cache-expire never'. |