Skip to content

Instantly share code, notes, and snippets.

View ypetya's full-sized avatar
💭
🚀

Peter Kiss ypetya

💭
🚀
  • Budapest, Hungary
View GitHub Profile
@ypetya
ypetya / .gitignore
Last active October 10, 2016 14:16
Helper
/nbproject
@ypetya
ypetya / bookmarks.csv
Last active October 19, 2015 08:02
Playing with d3
link title
http://bl.ocks.org/mbostock/5872848 dispatching events
http://bl.ocks.org/jasondavies/3186840 stopPropagation - mouse events
https://strongriley.github.io/d3/#enter_and_exit enter-exit
http://bost.ocks.org/mike/constancy/ key functions
http://bost.ocks.org/mike/join/ Thinking with joins enter exit
https://github.com/mbostock/d3/wiki/Formatting#d3_format d3 formatting numbers
http://bl.ocks.org/zanarmstrong/05c1e95bf7aa16c4768e d3 formatting numbers example
http://www.w3.org/2002/09/tests/keys.html keyboard events - keyCodes
http://www.w3.org/TR/DOM-Level-3-Events/#event-flow DOM events
@ypetya
ypetya / foods-gi-index.js
Last active October 17, 2016 14:28
lodash filter over food GI-index
var foods = {
"Kukorica szirup": 115,
"Sör": 110,
"Szőlőcukor": 100,
"Cukor szirup": 100,
"Sült krumpli": 95,
"Maltodextrin": 95,
"Burgonya keményitő": 95,
"Burgonya, kemencében sütött": 95,
"Rizs liszt": 95,
@ypetya
ypetya / alternate-class.js
Last active November 22, 2016 15:59
playing with CSS
/**
* when you load this module:
*
* after window.onload it will look DOM elements classed by `alternate`
* it will start put and remove class specified in the `alternate` attr of those
* elements in 5 seconds each
* */
(function initAlternateClassApiOn(window, initCb){
window.alternateClassBySelector = function(selector, className) {
@ypetya
ypetya / clipboard.js
Last active July 27, 2022 01:59
Copy to Clipboard javascript
(function createClipboardAPI(document){
/**
* multi browser clipboard copy - [email protected]
* */
document.ClipboardApi = new ClipboardApi();
function ClipboardApi() {
this.setCopyButton= function(selector, copyAreaSelector) {
var copyBtn = document.querySelector(selector);
@ypetya
ypetya / index.html
Last active November 25, 2020 12:12
Pulse zone calculator
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script src="main.js"></script>
<title>Pulse zone calculator</title>
<style>
.float {
float: left;
@ypetya
ypetya / config.js
Last active August 29, 2015 14:26
CouchDB accessing prototype
(function setupConfiguration(mainScope){
mainScope.config={
couchdb : {
port : 5984,
db : 'test',
url : ''
}
};
mainScope.config.couchdb.url =
@ypetya
ypetya / addScriptToDocument.js
Last active August 29, 2015 14:18
JS Tweaks / Bookmarks
javascript:(function loadThings(){ var script = document.createElement('script'); script.src=window.prompt('Enter script path to load'); document.body.appendChild(script);})()
@ypetya
ypetya / graph.js
Last active August 31, 2015 12:44
Temperature experiment. http://j.mp/home_sensors
var Graph = function () {
var attrs = {
height: 200,
width: 400,
resolution: 200,
dataSource: null
}, instance = this,
scaleHumidity,
scaleTemperature;
@ypetya
ypetya / burnout_prevention.md
Last active August 29, 2015 14:17
Burnout prevention training notes

Burnout prevention

  • burnout vs flow
  • prevention : not get unhappier

Greeting task of each other, your company

The background info is very important

How does your Monday start?