Skip to content

Instantly share code, notes, and snippets.

View yakovkhalinsky's full-sized avatar

Yakov Khalinsky yakovkhalinsky

View GitHub Profile
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@elado
elado / AngularBaseCtrl.coffee
Last active January 28, 2017 08:43
Angular.js CoffeeScript Controller Base Class
# dependency - Function.prototype.bind or underscore/lodash
app = angular.module 'someApp'
class @BaseCtrl
@register: (app, name) ->
name ?= @name || @toString().match(/function\s*(.*?)\(/)?[1]
app.controller name, @
@inject: (args...) ->
@mhart
mhart / index.coffee
Last active January 2, 2016 13:49
Simple example using CoffeeScript syntax with React (run with `coffee` command to verify output). Could get some nicer syntax by wrapping some of the `DOM` functions so that the first arg doesn't need to be `null` when there are no attributes - and also so that arrays could be splatted automatically for children if required.
React = require 'react'
{ul, li, div, h3, button, form, input} = React.DOM
TodoApp = React.createClass
getInitialState: ->
items: @props.items
text: ''
@paulirish
paulirish / what-forces-layout.md
Last active July 27, 2024 23:38
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.

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
@BBlackwo
BBlackwo / kraken.fish
Created March 1, 2017 08:05
Open GitKraken from the terminal
## Forked from https://gist.github.com/dersam/0ec781e8fe552521945671870344147b
## Also received help from https://twitter.com/gitkraken/status/691675309725368321
## Open GitKraken using the current repo directory.
## This code is for fish shell. The same thing can be done in bash
## by creating an alias with the command below.
## `1>/dev/null` directs logs from the terminal
## `&` allows use of the same terminal instance to do other things