Skip to content

Instantly share code, notes, and snippets.

function fitConsole(){
var a = document.getElementById("vmrcObject");
var b = window.getComputedStyle(a);
var c = parseInt(b.height);
var d = parseInt(b.width);
//some XSS
vmrc.setScreenSize(d,c);
}
@gartnera
gartnera / gist:8975a1be6f002233c024
Created September 2, 2014 14:37
VMware force html5 console (paste into console)
function openPopoutConsole(vmName, vmId, vAppName, vmDevicesAvailable, buttonLabels, miscLabels, confirmationLabels, isVmrc) {
if (windowHandles[vmId] != null && !windowHandles[vmId].closed) {
windowHandles[vmId].focus();
return;
}
var defaultConsoleWidth = 720;
var defaultConsoleHeight = 400;
var cssWidth = 0;
var irc = require('irc');
var reply = [
"I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.",
"Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called \"Linux\", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.",
"There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of
@gartnera
gartnera / Fit to guest changes to fit guest
Last active August 29, 2015 14:06
VMware vCloud 5.5 Scripts
// ==UserScript==
// @name vmware console hacks
// @namespace http://agartner.com
// @version 0.1
// @description Changes fit to guest to fit guest
// @match https://vcloud.ialab.us/cloud/VMRCConsole.html
// @copyright 2014, Alex Gartner
// @grant none
// ==/UserScript==
window.addEventListener('load', main, false);
@gartnera
gartnera / gist:9869e5094cb39bf9e616
Last active September 24, 2016 22:10
2016 Mazda6 specs

#OS Version 51.00.350 #uname Linux cmu 3.0.35 #9 SMP PREEMPT Sat Oct 25 16:40:22 EDT 2014 armv7l GNU/Linux

#cpuinfo Processor : ARMv7 Processor rev 10 (v7l) processor : 0 BogoMIPS : 1699.02

@gartnera
gartnera / owa_keepalive.user.js
Created April 18, 2015 19:36
OWA Keep Alive
// ==UserScript==
// @name OWA Keep Alive
// @namespace agartner.com
// @include https://webmail.dsu.edu/owa/
// @version 1
// @grant none
// ==/UserScript==
setInterval(function(){onUserActivity()}, 600000)
@gartnera
gartnera / keybase.md
Created June 10, 2015 23:10
keybase.md

Keybase proof

I hereby claim:

  • I am gartnera on github.
  • I am agartner (https://keybase.io/agartner) on keybase.
  • I have a public key whose fingerprint is EC2B 1BF4 932E CB24 D466 21C1 129E C26A 66FE F453

To claim this, I am signing this object:

@gartnera
gartnera / starrow.c
Last active October 21, 2015 20:19
Assignment 5 Examples
int i;
for (i = 0; i < 10; ++i)
{
printf(" *");
}
printf("\n");
@gartnera
gartnera / Diamond
Last active February 23, 2016 18:12
Assignment 4 Pseudocode
//three loops, one for upper, one for middle, one for lower
h = height / 2
if h is even
height - 1
//upper half
for height to 0
for 0 to outer index
@gartnera
gartnera / a.js
Last active April 2, 2016 21:46
webadvisor json roster creator
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.download=t()}(this,function(){return function e(t,n,o){function a(e){var t=e.split(/[:;,]/),n=t[1],o="base64"==t[2]?atob:decodeURIComponent,a=o(t.pop()),r=a.length,i=0,d=new Uint8Array(r);for(i;r>i;++i)d[i]=a.charCodeAt(i);return new h([d],{type:n})}function r(e,t){if("download"in m)return m.href=e,m.setAttribute("download",v),m.className="download-js-link",m.innerHTML="downloading...",b.body.appendChild(m),setTimeout(function(){m.click(),b.body.removeChild(m),t===!0&&setTimeout(function(){c.URL.revokeObjectURL(m.href)},250)},66),!0;if("undefined"!=typeof safari)return e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=b.createElement("iframe");b.body.appendChild(n),t||(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),n.src=e,setTimeout(function(){b.body.remove