Skip to content

Instantly share code, notes, and snippets.

View goranobradovic's full-sized avatar

Goran Obradović goranobradovic

View GitHub Profile
<?xml version="1.0"?>
<GlobalData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SystemData>
<Star>
<Name>Sun</Name>
<Radius>696000</Radius>
<Color>
<Red>1</Red>
<Green>0.843137264</Green>
<Blue>0</Blue>

Keybase proof

I hereby claim:

  • I am goranobradovic on github.
  • I am goranobradovic (https://keybase.io/goranobradovic) on keybase.
  • I have a public key whose fingerprint is 2E45 CE7E F309 E965 BCB5 E4F2 E413 A099 5ED4 8CF5

To claim this, I am signing this object:

@goranobradovic
goranobradovic / formfiller.js
Created November 11, 2012 11:45
js for filling html forms with data
function deserializeForm(jsonData) {
for (var field in jsonData) {
var value = jsonData[field];
fillFormField(field.trim(), value);
}
}
function fillFormField(field, value) {
var input = $("#" + field);
if (input.is("input[type=checkbox]") && value) {
@goranobradovic
goranobradovic / register
Created October 26, 2012 08:50
Register player script
var fName = "John", lName = "Smith", domain = "goranobradovic.com";
var uName = fName.toLowerCase() + lName.toLowerCase();
var waitBetweenInputs = 100;
var testUser = {
// all fields to be filled on form should be here
"UserName": uName,
"Password": uName,
"_Password": uName,
"ConfirmPassword": uName,
"_ConfirmPassword": uName,
@goranobradovic
goranobradovic / JSPartialClassWithPartialConstructor.js
Created July 13, 2012 10:53
Partial class with partial constructor in JS
// sample on http://jsfiddle.net/goranobradovic/tvd7F/
// part 1
var MyClass = (function (MyClass) {
var self = MyClass;
function MyInternalClass(){
function MyMethod() {
alert("DoSomething");
};