Skip to content

Instantly share code, notes, and snippets.

View Drarok's full-sized avatar

Mat Gadd Drarok

View GitHub Profile
SELECT
ServerObject.Name,
storageYesterday.Committed AS committedYesterday,
storageToday.Committed AS committedToday,
ROUND((storageToday.Committed - storageYesterday.Committed) / 1073741824) AS DifferenceGB
FROM
ServerObject
LEFT OUTER JOIN
StorageUsedByVm AS storageYesterday ON
storageYesterday.VcenterId = ServerObject.VcenterId
<?php
$username = 'trololololol';
$password = 'trololololol';
$url = 'http://some-project.localdev/';
// Set some curl options.
$ch = curl_init();
curl_setopt_array($ch, array(
<?php
function csv_to_array($filename='/root/samhodson/nagios-dev.csv', $delimiter=',', $enclosure = '"')
{
if(!file_exists($filename) || !is_readable($filename)) echo "neg";
return FALSE;
$header = NULL;
$data = array();
if (($handle = fopen($filename, 'r')) !== FALSE)
@Drarok
Drarok / gist:7b2fb47658f6869eb8a1
Created January 26, 2015 17:23
Pragma-style markers in Swift
// MARK: - Section1
func section1Method0() {
}
// MARK: Test1-1
func section1Method1() {
}
// MARK: Test1-2
func section1Method2() {
@Drarok
Drarok / keybase.md
Created December 23, 2016 12:04
keybase.md

Keybase proof

I hereby claim:

  • I am drarok on github.
  • I am drarok (https://keybase.io/drarok) on keybase.
  • I have a public key ASBCSGkFPrCDqU8IlNfmzDuicESYg_cmT0G1ymIm9rbmAAo

To claim this, I am signing this object:

{
"see": "this is still accessible"
}