Skip to content

Instantly share code, notes, and snippets.

View josuigoa's full-sized avatar

Josu Igoa josuigoa

View GitHub Profile
@josuigoa
josuigoa / MacroJsonValidator.hx
Last active March 28, 2017 16:06 — forked from markknol/MacroJsonValidator.hx
Macro - validate a JSON compiletime
/**
* @author Mark Knol
*/
class MacroJsonValidator {
public static macro function validateJson(path:String) {
if (sys.FileSystem.exists(path)) {
var content = sys.io.File.getContent(path);
try {
// Test the json by parsing it.
// It will throw an error when you made a mistake.
@josuigoa
josuigoa / labur.js
Last active May 31, 2017 10:04 — forked from aldakur/labur.js
labur
jQuery(document).ready(function($) {
jQuery("#button_polr_get_url").click(function(){
var doc_pathname = '';
var url = document.location.protocol + '//' + document.location.host + MyAjax.ajax_path;
jQuery.ajax({
type: 'POST',
url: url,
dataType: 'text',