Skip to content

Instantly share code, notes, and snippets.

View qmmr's full-sized avatar

Marcin Kumorek qmmr

View GitHub Profile
@qmmr
qmmr / Preferences.sublime-settings
Created February 4, 2015 14:53
Sublime Text Preferences
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_extra_width": 2,
"color_scheme": "Packages/User/SublimeLinter/base16-eighties.dark (SL).tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"extract_sublime_package_ask_on_open": true,
"fallback_encoding": "Central European (ISO 8859-2)",
"file_exclude_patterns":
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];
function dedent(callSite, ...args) {
function format(str) {
let size = -1;
return str.replace(/\n(\s+)/g, (m, m1) => {
if (size < 0)
size = m1.replace(/\t/g, " ").length;
@qmmr
qmmr / tdee.js
Last active April 10, 2021 03:56
Calculate your BMR & TDEE
// Total Daily Energy Expenditure
function TDEE (data) {
this.weight = data.weight || 60
this.height = data.height || 180
this.age = data.age || 20
this.sex = data.sex || 'male'
this.bodyType = data.bodyType || 'ectomorph'
this.numberOfWorkouts = data.numberOfWorkouts || 3
this.durationOfWorkout = data.durationOfWorkout || 45
this.ratios = data.ratios || {
@qmmr
qmmr / SassMeister-input-HTML.haml
Created February 2, 2014 20:14
Generated by SassMeister.com.
%header
%h1 Flexbox - ordering items
%h2 Control display with order
%section.flex-container
.box.one
%h3 One
.box.two
%h3 Two
.box.three
%h3 Three
@qmmr
qmmr / SassMeister-input-HTML.haml
Created February 2, 2014 18:21
Flexbox - aligning multiple lines.
%header
%h1 Flexbox - aligning multiple lines
%article
%section.flex-container
.box
%h3 One
.box
%h3 Two
.box
%h3 Three
@qmmr
qmmr / SassMeister-input-HTML.haml
Last active August 29, 2015 13:55
Flexbox - justify-content & align-items (horizontal & vertical)
%header
%h1 Flexbox - main axis alignment
%article
%section.flex-container
.box.flex1
%h3 One
.box.flex1
%h3 Two
.box.flex2
%h3 Three
@qmmr
qmmr / SassMeister-input-HTML.haml
Created February 2, 2014 15:35
Generated by SassMeister.com.
%header
%h1 Flexbox - main axis alignment
%article
%section.flex-container
.box.flex1
%h3 One
.box.flex1
%h3 Two
.box.flex2
%h3 Three
@qmmr
qmmr / SassMeister-input-HTML.haml
Created February 1, 2014 15:03
Generated by SassMeister.com.
%header
%h1 Flexbox
%p Comparison of different Flex values
%article
%h2 flex: 100px
%section.flex-container.hundredpx
.box.flex1
%h3 One
.box.flex1
%h3 Two
@qmmr
qmmr / SassMeister-input-HTML.html
Created January 25, 2014 21:32
Generated by SassMeister.com.
<div class="quick-deposit">
<section class="quick-deposit__introduction">
<header>
<h1>Welcome</h1>
</header>
</section>
<section class="quick-deposit__form">
<label for="account_number" class="quick-deposit__label">Account #</label>
<input id=account_number type="text" name="account_number" value="1234-1234-1234">
</section>