Skip to content

Instantly share code, notes, and snippets.

View octopuss's full-sized avatar

Ivan Doležal octopuss

View GitHub Profile
@octopuss
octopuss / MaestroValidator.java
Last active August 29, 2015 14:26
RegexpValidator for Maestro
package sk.octopuss.test;
import junit.framework.Assert;
import org.apache.commons.validator.routines.CodeValidator;
import org.apache.commons.validator.routines.CreditCardValidator;
import org.apache.commons.validator.routines.RegexValidator;
import org.apache.commons.validator.routines.checkdigit.LuhnCheckDigit;
import org.junit.Test;
/**
@octopuss
octopuss / earth
Last active April 26, 2025 13:20
Three.js demo showing rotating earth with drag drop and zooming functionality
<html>
<head>
<title>Tree.js demo earth</title>
</head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/three.js/84/three.min.js"></script>
<script type="text/javascript" src="http://threejs.org/examples/js/controls/TrackballControls.js"></script>
<body>
@octopuss
octopuss / gist:825946c8a2aad917a56c
Last active August 29, 2015 14:20
CoffeeCounter
#define LOGGING
// This #include statement was automatically added by the Spark IDE.
#include "HttpClient/HttpClient.h"
// This #include statement was automatically added by the Spark IDE.
#include "LiquidCrystal_I2C_Spark/LiquidCrystal_I2C_Spark.h"
/** include library */
#include "application.h"
@octopuss
octopuss / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../chart-js/chart-js.html">
<polymer-element name="my-element">
<template>
<style>
console.log("Running sql blob exporter");
var mysql = require('mysql');
fs = require('fs');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database :'arto'
});