Skip to content

Instantly share code, notes, and snippets.


Evgeny Poberezkin epoberezkin

View GitHub Profile
View haddock: stack init
> stack init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
- haddock-api/
- haddock-library/
- haddock-test/
Selecting the best among 17 snapshots...
epoberezkin / Placeholders for IE
Created Mar 16, 2013
Placeholders for IE without touching the field content
View Placeholders for IE
All placeholders plugins I could find were inserting placeholder in the field itself.
This approach has many disadvantages.
1. If your JavaScript code throws an exception you are stuck with the wrong field content that can be submitted.
2. Few of these plugins work for password fields, and those that do are quite complex.
3. You can't style placeholder created this way differently from the field content.
So I created placeholders that are additional elements that places themselves on top of the fields and show/hide depending on whether the filed is empty.
Placeholder element created with this function is span.placeholder, it should be added to the list of CSS rules used to style placeholders.
epoberezkin / Resizing elements backgrounds with jQuery
Last active Dec 14, 2015
Resizing elements backgrounds with jQuery is simple!
View Resizing elements backgrounds with jQuery
Why use plugin in a separate file for something that takes less than 20 lines of code?
epoberezkin / Shared javascript module template
Last active Dec 14, 2015
Javascript module template to share code between Node (CommonJS) and browser with requirejs (AMD).
View Shared javascript module template
All modules templates I've seen were not suited for code sharing
between client/server in case the module has dependencies.
This template will only work on server-side if module's dependencies
are in node_modules (installed with npm) on server side and are
available without any path in require.
In case the dependencies are part of the application, their paths
will be different in nodejs and in browser,
so some adaptation will be required to use correct dependencies paths.
epoberezkin / Popups without Javascript
Last active Feb 16, 2020
Popup windows without Twitter bootstrap or Javascript
View Popups without Javascript
It's easy to make popup windows without Twitter bootstrap or Javascript.
Example below uses :target pseudoclass to do it.
It adds one extra <a> tag to HTML, used as anchor (see comments in HTML file).
And it adds just 2 lines of CSS to show popup and its background.
You can have as many popups as you need - they will all work.
You can’t perform that action at this time.