Skip to content

Instantly share code, notes, and snippets.

:octocat:
Working on OSS 20% of the time

Mohsen Azimi mohsen1

:octocat:
Working on OSS 20% of the time
Block or report user

Report or block mohsen1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active May 30, 2020
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@rtorr
rtorr / README.md
Last active Feb 13, 2020
Visual Studio Code fish shell shortcut
View README.md

Put this in your config.fish

run

code path/to/project

@mohsen1
mohsen1 / style.css
Last active Dec 18, 2015
Github dark theme This theme uses webkit filters to achive a consistent dark theme across all Github pages.
View style.css
/* Invert all the things! */
html
{
-webkit-filter: invert(1) grayscale(0.6);
}
/* Execpt these guys... */
img,
.minibutton,
.state-indicator,
@mohsen1
mohsen1 / bash_profile
Last active Dec 12, 2015
My bash_profile
View bash_profile
###########
# Aliases #
###########
alias ll='ls -l'
alias js='node'
alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
alias ls='ls -G'
alias gadd="git add .; git add -u .; git status;"
alias nook='cd ~/Projects/NookWeb/nook.com'
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 30, 2020
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

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:

@olivierlacan
olivierlacan / An_example.markdown
Created Feb 18, 2012 — forked from renz45/An_example.markdown
Re-style Sublime Text 2 sidebar to a darker theme
View An_example.markdown

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.

@andrei-m
andrei-m / levenshtein.js
Last active Apr 30, 2020
Levenshtein distance between two given strings implemented in JavaScript and usable as a Node.js module
View levenshtein.js
/*
Copyright (c) 2011 Andrei Mackenzie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
@endolith
endolith / Has weird right-to-left characters.txt
Last active May 29, 2020
Unicode kaomoji smileys emoticons emoji
View Has weird right-to-left characters.txt
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
You can’t perform that action at this time.