Skip to content

Instantly share code, notes, and snippets.

Avatar
🤦‍♂️
Watching my hand

Leszek Pietrzak magicznyleszek

🤦‍♂️
Watching my hand
View GitHub Profile
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active Jul 27, 2022
Jekyll & Liquid Cheatsheet
View jekyll-and-liquid.md

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@magicznyleszek
magicznyleszek / css-selectors.md
Last active Jul 23, 2022
CSS Selectors Cheatsheet
View css-selectors.md

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 / smutnyleszek-conkyrc
Created Mar 29, 2014
Crunchbang Conky configuration
View smutnyleszek-conkyrc
# --------------------------------------------------
# Conky configuration
# Author: Leszek Pietrzak <smutnyleszek@gmail.com>
# Web: http://leszekpietrzak.com
# --------------------------------------------------
# --------------------------------------------------
# Settings
# --------------------------------------------------
@magicznyleszek
magicznyleszek / multiply-blending-mode-to-png.md
Created Aug 20, 2014
Multiply blending mode to PNG in Photoshop
View multiply-blending-mode-to-png.md
  1. copy your image (Ctrl+A and Ctrl+C)
  2. make a new document-sized pure-black layer behind it
  3. group the black layer and yor image together
  4. add mask to the group
  5. enter mask edit mode (alt+click on the mask icon/thumbnail)
  6. paste your image in the mask (b/w) and then invert it.
  7. save it as a 24-bit transparent PNG
@magicznyleszek
magicznyleszek / random-non-overlapping-position.js
Last active Apr 11, 2022
JavaScript -- get random non-overlapping position
View random-non-overlapping-position.js
// declarations
var positions = [];
// Returns a random integer between min (included) and max (excluded)
// Using Math.round() will give you a non-uniform distribution!
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
// generate random positions
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
View javascript-vs-jquery.md

Vanilla JavaScript

Some vanilla equivalents to jQuery methods.

DOM selectors

jQuery:

@magicznyleszek
magicznyleszek / git.md
Last active Jun 10, 2021
Git Cheatsheet
View git.md
View my-dev-setup.md