Skip to content

Instantly share code, notes, and snippets.

View saki007ster's full-sized avatar
:octocat:

Saket Kumar saki007ster

:octocat:
View GitHub Profile
@saki007ster
saki007ster / pr.md
Created May 10, 2017 15:42 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@saki007ster
saki007ster / README.md
Created February 6, 2016 22:16 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@saki007ster
saki007ster / what-forces-layout.md
Created January 31, 2016 11:10 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@saki007ster
saki007ster / Preferences.sublime-settings
Last active September 7, 2016 08:51 — forked from pratik60/Preferences.sublime-settings
my preferences - pre material
{
"auto_indent": true,
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/Seti_UX/Seti.tmTheme",
"default_line_ending": "unix",
"detect_indentation": true,
"detect_slow_plugins": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For less, I'm using the ruby version because this is what they suggest on the website. The javascript version may be different.

Variables