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
SELECT MIN(days.SD) | |
FROM | |
(SELECT SYSDATE + 366 - ROWNUM SD, | |
EXTRACT(YEAR FROM SYSDATE + 366 - ROWNUM) Y, | |
EXTRACT(MONTH FROM SYSDATE + 366 - ROWNUM) M, | |
EXTRACT(DAY FROM SYSDATE + 366 - ROWNUM) D | |
FROM ALL_OBJECTS WHERE ROWNUM < 368) days | |
LEFT JOIN WF_NON_WORK_DAYS holidays ON holidays.DAY = days.D AND holidays.MONTH = days.M | |
WHERE days.SD <= :DUE_DATE AND | |
(holidays.NON_WORK_DAY IS NULL OR holidays.NON_WORK_DAY = 0) AND |
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
#!/usr/bin/perl | |
###################################################################### | |
###################################################################### | |
## | |
## Name: dna.pm | |
## | |
## Prpose: Object for the reading and writing of DNA files | |
## | |
## Author: Matthew Barbour |
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
# This should be changed to your system's jenkins root JENKINS_ROOT="/var/lib/jenkins" | |
JENKINS_USERS="$JENKINS_ROOT/users" | |
JENKINS_JOBS="$JENKINS_ROOT/jobs" | |
JENKINS_CONFIG="$JENKINS_ROOT/config.xml" | |
# This variable is used so that we can verify that a user is not found | |
FAIL_TEST=0 | |
exportUserFolder() { | |
if [ -d "$JENKINS_USERS/$1" ]; then |
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
using System; | |
namespace Exceptions { | |
public class WTFException : Exception { | |
public WTFException(Exception ex) : base(null, ex) { } | |
public WTFException(string message, Exception ex) : base(message, ex) { } | |
public WTFException(string message) : base(message) { } | |
} | |
} |
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 | |
// Database connection wrapper library written by Matthew Barbour in 2012 | |
// Kind of mimics Wikipedia's db wrapper | |
class Database { | |
public $server; | |
public $user; | |
public $password; | |
public $db; | |
public $link; | |
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
Private Function FormatDuration(ByVal total As Integer) As String | |
Dim days As Integer = Math.Floor(total / (60 * 24)) | |
Dim hours As Integer = Math.Floor((total Mod (60 * 24)) / 60) | |
Dim minutes As Integer = (total Mod (60 * 24)) Mod 60 | |
Dim output As New StringBuilder | |
If days <> 0 Then | |
output.Append(days) | |
output.Append("d ") | |
End If | |
If output.Length = 0 Then |
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
Private Function PrintDataSetToHTML(ByRef ds As DataSet) As String | |
Dim output As New StringBuilder | |
For Each dt As DataTable In ds.Tables | |
output.AppendLine("<table>") | |
output.Append("<caption>") | |
output.Append(dt.TableName) | |
output.AppendLine("</caption>") | |
output.AppendLine("<tr>") | |
For Each dc As DataColumn In dt.Columns | |
output.Append("<th>") |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
var filesystems=<?php | |
$filesystems = array(); | |
$header_regex = "|^([A-Za-z0-9/]+)\s+([a-z]+)\s+([^\s]+)\s+([a-z-]+)$|"; | |
$output = array(); |
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
<html> | |
<head> | |
<script> | |
function process() { | |
var element = document.getElementById("input"); | |
var input = element.value; | |
var data = new Array(); | |
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
#!/usr/bin/perl | |
use Data::Dumper; | |
sub GetIpAddresses{ | |
my $output = qx(ifconfig); | |
my $hash = {}; | |
my $interface; | |
foreach my $line (split /[\r\n]+/, $output) { | |
if($line =~ m/^([^ ]+)/) { |
OlderNewer