Skip to content

Instantly share code, notes, and snippets.

Avatar
🤦‍♂️
Watching my hand

Leszek Pietrzak magicznyleszek

🤦‍♂️
Watching my hand
View GitHub Profile
@magicznyleszek
magicznyleszek / scale.js
Created Mar 29, 2014
Typographic scale creator
View scale.js
// 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) {
@magicznyleszek
magicznyleszek / smutnyleszek-themerc
Last active Aug 29, 2015
Crunchbang Openbox theme
View smutnyleszek-themerc
!! --------------------------------------------------
!! Theme: smutnyleszek
!! Description: Based on waldorf CrunchBang theme
!! Author: Leszek Pietrzak <smutnyleszek@gmail.com>
!! Web: http://leszekpietrzak.com
!! --------------------------------------------------
!! --------------------------------------------------
!! Color palette:
View obrazki.php
<?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 Aug 29, 2015
Fisher-Yates shuffle algorithm
View shuffle-fisher-yates.js
// 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 Aug 29, 2015
Human emotions -- scientific categorization
View human-emotions.md

Human emotions

Scientific categorization with basic descriptions

HUMAINE

HUMAINE proposal for EARL (Emotion Annotationand Representation Language)

  • Negative and forceful
View comprowssor.html
<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>
View atom-snippets.cson
# 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
View illustrator-tips-and-tricks.md

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:

View atom-keyboard-shortcuts.md

Atom Keyboard Shortcuts

General

shift + ⌘ + p -- toggle command palette

⌘ + / -- toggle line/selection comment

alt + shift + s -- show available snippets