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
@OneCent01
OneCent01 / color object
Last active January 3, 2022 07:28
Every color contained in an object with its corresponding hexa value for O(1) time lookup, find function below object
var colors = {
ALICEBLUE: '#F0F8FF',
ANTIQUEWHITE: '#FAEBD7',
AQUA: '#00FFFF',
AQUAMARINE: '#7FFFD4',
AZURE: '#F0FFFF',
BEIGE: '#F5F5DC',
BISQUE: '#FFE4C4',
BLACK: '#000000',
BLANCHEDALMOND: '#FFEBCD',
@w33ble
w33ble / dbprune.js
Last active January 12, 2018 17:40
Pruning Dickbars - Bookmarklet Code
// version 4-2017.18
(function dbprune() {
// restore page scrolling
var body = document.body;
var html = body.parentElement;
body.style['overflow'] = body.style['overflow-y'] = 'auto';
html.style['overflow'] = html.style['overflow-y'] = 'auto';
// check if this is a mobile display
var mHeight = 680;
@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 / 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 / css-selectors.md
Last active March 29, 2024 01:12
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Hi! If you see an error or something is missing (like :focus-within for few years :P) please let me know ❤️

Element selectors

Element -- selects all h2 elements on the page

h2 {
@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: