Skip to content

Instantly share code, notes, and snippets.

View octopuss's full-sized avatar

Ivan Doležal octopuss

View GitHub Profile
{
"packages": [
{
"name": "ATTinyCore",
"maintainer": "Spence Konde",
"websiteURL": "https://github.com/SpenceKonde/ATTinyCore",
"email": "",
"help": {
"online": ""
},
@octopuss
octopuss / earth
Last active October 29, 2022 08:22
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 / notes.md
Last active April 23, 2018 07:28
IOT workshop notes
  • instalace samotného Arduino IDE + ostatní možnosti
    • přidat knihovny
  • ukázat i blynk.cc?
  • ukázat rozblikání ledky
  • ukázat web server
  • senzory - řící co za senzor jsme vybrali
  • propojit senzor a nechat si vypisovat hodnoty na serial
  • založit účet na thingspeak
  • začít posílat data do grafu
  • vyřešit sleep mode
@octopuss
octopuss / gol.js
Last active March 25, 2018 08:23
GOL ramda
const board = [[0,0], [1,1], [0,1]];
const neigh = ([x,y]) => [[x-1, y], [x, y-1], [x+1, y+1], [x, y+1], [x+1, y],[x-1, y-1], [x-1, y+1], [x+1, y-1]];
let mapcat = fn => transduce(map(fn), concat,[]);
const filterIndexed = addIndex(filter);
const cellFromKey = (key) => compose(map(Number), split(','))(key);
const isAlive = (i, counts, board) => contains(cellFromKey(keys(counts)[i]), board);
const golRules = (counts, board) => (x, i) => x === 3 || (x===2 && isAlive(i, counts, board));
const filterSurroundings = (board) => (counts) => filterIndexed(golRules(counts, board))(counts);
@octopuss
octopuss / id_cv_en.md
Created September 1, 2017 10:50
CV Ivan Doležal

Ivan Doležal ivan.dolezal@gmail.com https://www.linkedin.com/in/octopuss +420724621005 Jungmannova 1405, 50005 Hradec Králové, Czech Republic

PERSONAL INFORMATION

As an experienced Team Leader and developer I like to solve problems and help people getting job done. With my skills and more than 12 years of experience in application development I can help your company to fulfil your goals and objectives.

Personal Skills:

  • Experienced J2EE/Spring framework based application developer
@octopuss
octopuss / 5minIOT.md
Last active August 18, 2017 08:21
Short description to my ReactiveLT talk
@octopuss
octopuss / promises.js
Created November 3, 2016 21:39
Promises alternative to async await http://www.es6fiddle.net/iv2vj8jm/
console.log("First");
var p = new Promise((ok, reject) => {
try {
console.log("Second");
ok();
} catch (err) {
reject();
}
});
p.then(() => {console.log("Fourth")})
@octopuss
octopuss / asyncawait.js
Last active November 3, 2016 21:25
Just testing of js async await principle http://www.es6fiddle.net/iv2v00tn/
async function greet(who) {
try {
console.log("(2) Greet is beeing composed, and printed second because no await was present yet")
var greeting = await composeGreet(who);
console.log ("(5) Greet composed and promise fullfilled");
console.log("(6) " + greeting);
} catch(error) {
console.error(error);
}
}
@octopuss
octopuss / Cell.php
Created March 6, 2016 14:25
GOL php simple implementation
<?php
class Cell {
public $x;
public $y;
public $surroundings = [];
public function __construct($x, $y)
console.log("Running sql blob exporter");
var mysql = require('mysql');
fs = require('fs');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database :'arto'
});