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 / 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) {
<?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 / 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];
@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 / comprowssor.html
Last active August 29, 2015 14:06
Comprowssor
<table data-comprowssor>
<caption>Middle Jurassic sections</caption>
<thead>
<tr>
<th>Name</th>
<th>Period <small>[Mya]</small></th>
<th>Duration <small>[My]</small></th>
<th>Species</th>
</tr>
</thead>
@magicznyleszek
magicznyleszek / atom-snippets.cson
Last active August 29, 2015 14:21
Atom Snippets
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting tab.
#-------------------------------------------------------------------------------
# CoffeScript
@magicznyleszek
magicznyleszek / illustrator-tips-and-tricks.md
Created July 17, 2015 07:15
Illustrator tips & tricks

Illustrator tips & tricks

Some smart moves to make up for missing functionalities.

Circle through two points

Result: circle of given radius that is going exacly through two anchor points.

Steps:

@magicznyleszek
magicznyleszek / atom-keyboard-shortcuts.md
Last active September 21, 2015 13:53
Atom Keyboard Shortcuts

Atom Keyboard Shortcuts

General

shift + ⌘ + p -- toggle command palette

⌘ + / -- toggle line/selection comment

alt + shift + s -- show available snippets

@magicznyleszek
magicznyleszek / ntc.js
Created July 31, 2014 09:19
Name that Color by Chirag Mehta
/*
+-----------------------------------------------------------------+
| Created by Chirag Mehta - http://chir.ag/projects/ntc |
|-----------------------------------------------------------------|
| ntc js (Name that Color JavaScript) |
+-----------------------------------------------------------------+
All the functions, code, lists etc. have been written specifically
for the Name that Color JavaScript by Chirag Mehta unless otherwise