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
body {
white-space: pre;
font-family: monospace;
font-size: 14px;
line-height: 1.5;
background: hsl(212, 25%, 12%);
color: hsl(213, 18%, 66%);
margin: 1rem;
}
@magicznyleszek
magicznyleszek / debugging-angularjs-from-console.md
Last active March 18, 2016 14:05
Debugging AngularJS from console

Debugging AngularJS from console

Note: In Chrome Console, instead of document.querySelector, you can use $0 - $4 to access the last 5 DOM elements selected in the inspector window.

Access Scopes

var fooCtrl = angular.element(document.querySelector('[ng-controller*="fooCtrl"]')).scope();
@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 / mac-commands.md
Last active November 30, 2015 08:02
Useful Mac Commands

Useful Mac Commands

Common stuff

Find all files in current directory by extension

find . -type f -name "*.extension"
@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
@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 / 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-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 / 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>