Skip to content

Instantly share code, notes, and snippets.

View magicznyleszek's full-sized avatar
🤦‍♂️
Watching my hand

Leszek Pietrzak magicznyleszek

🤦‍♂️
Watching my hand
View GitHub Profile
@magicznyleszek
magicznyleszek / human-emotions.md
Last active August 29, 2015 14:02
Human emotions -- scientific categorization

Human emotions

Scientific categorization with basic descriptions

HUMAINE

HUMAINE proposal for EARL (Emotion Annotationand Representation Language)

  • Negative and forceful
@magicznyleszek
magicznyleszek / shuffle-fisher-yates.js
Last active August 29, 2015 14:02
Fisher-Yates shuffle algorithm
// Fisher-Yates shuffle algorithm: http://bost.ocks.org/mike/shuffle/
function shuffle(array) {
var m = array.length, t, i;
// while there remain elements to shuffle
while (m) {
// pick a remaining element
i = Math.floor(Math.random() * m--);
// and swap it with the current element
t = array[m];
array[m] = array[i];
<?php
function obrazki($tag) {
$dir = './images/foto';
if (is_dir($dir)) {
if ($dir_open = opendir($dir)) {
while ($file = readdir($dir_open)) {
if ($file == "." || $file == "..") continue;
$file_tag = substr($file,0,strlen($file)-7);
if ($file_tag == $tag) $tab[] = $file;
}
@magicznyleszek
magicznyleszek / google-search-variables.md
Last active October 30, 2023 22:30
Google Search Variables

Google Search Variables

If you forgot about any of these terms, go to the Advanced Search page and be happy.

Words-related

Either/or -- search for pages containing any of phrases

@magicznyleszek
magicznyleszek / design-process.md
Last active March 12, 2018 12:35
Design Process

Design Process

Main steps:

  1. Meet
    1. Introduction
    2. Questions
    3. Money
  2. Explore
  3. Research
@magicznyleszek
magicznyleszek / metavariables.md
Last active November 30, 2015 09:10
Metavariables

Metavariables

  1. foo
  2. bar
  3. fum
  4. baz
  5. qux
  6. zot
  7. asd
  8. zxc
@magicznyleszek
magicznyleszek / website-checklist.md
Last active April 15, 2018 19:05
Website Checklist
@magicznyleszek
magicznyleszek / javascript-vs-jquery.md
Last active November 30, 2021 17:50
Vanilla JavaScript

Vanilla JavaScript

Some vanilla equivalents to jQuery methods.

DOM selectors

jQuery:

@magicznyleszek
magicznyleszek / scale.js
Created March 29, 2014 10:46
Typographic scale creator
// 16 + 24 @ 1/2
// 15 + 20 @ 1/2
// 16 + 20 @ 1/2
scale = {
main: 16,
secondary: 20,
fraction: 1/2,
measurements: [],
create: function(greater, lesser) {