Skip to content

Instantly share code, notes, and snippets.

View Dattaya's full-sized avatar

Yaroslav Kiliba Dattaya

View GitHub Profile
@Dattaya
Dattaya / _grid.scss
Last active March 18, 2016 08:08 — forked from Jakobud/bootstrap-ms.scss
Adds in the missing 480px-767px breakpoint range to Bootstrap 3 for SASS
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3.
//
// This is a hack to fill the gap between 480 and 767 pixels - a missing range
// in the bootstrap responsive grid structure. Use these classes to style pages
// on cellphones when they transition from portrait to landscape.
//
// Contains:
// Columns, Offsets, Pushes, Pulls for the Mid-Small layout
// Visibility classes for the Mid-Small layout
// Redefined visibility classes for the Extra Small layout
@Dattaya
Dattaya / 1client.js
Last active January 31, 2016 12:20
Universal match (draft)
// ...
const renderApp = (location, initialStatus) => {
return universalMatch({routes, location, store, history, deferred: true, initialStatus})
.then(({component, redirectLocation}) => {
if (redirectLocation) {
history.replace(redirectLocation)
} else {
render(component, document.getElementById('react-view'));
}
})
@Dattaya
Dattaya / client.js
Last active January 28, 2016 11:25
Universal router (draft)
...
const renderApp = (location, preload) => {
return universalRouter({routes, location, store, history, deferred: true, preload})
.then(({component, redirectLocation}) => {
if (redirectLocation) {
history.replace(redirectLocation)
} else {
render(component, document.getElementById('react-view'));
}
})
@Dattaya
Dattaya / 1. README.md
Created February 16, 2012 12:15
Symfony2.0.10. How to integrate assetic lessphp filter.

Symfony2.0.10. How to integrate assetic lessphp filter.

  • Add the following lines of code to the end of the deps file:
[lessphp]
    git=https://github.com/leafo/lessphp.git
    target=/lessphp
 version=v0.3.2
@Dattaya
Dattaya / 10. Readme.md
Created February 15, 2012 11:29
Symfony2.0.10, Simple HTML5Boilerplate integration
@Dattaya
Dattaya / gist:1689855
Created January 27, 2012 17:14 — forked from padolsey/gist:527683
Using jQuery I should have found out if a browser is IE 6-8. Took a great idea from @padolsey.
var ie678 = !!$("<i><!--[if lte IE 8]><i></i><![endif]--></i>").appendTo("body").children()[0];
@Dattaya
Dattaya / 10.parameters.ini
Created January 24, 2012 13:24
How to store user's locale in database. FOSUserBundle, Symfony2.0.9
# symfony2/app/config/parameters.ini
locale="undefined"
fallback_locale="en"