Skip to content

Instantly share code, notes, and snippets.

View dziudek's full-sized avatar

Tomasz Dziuda dziudek

View GitHub Profile
@cleverinx
cleverinx / custom_walker.php
Created May 8, 2016 04:15
Custom Wordpress Sub-Menu Walker
class custom_sub_walker extends Walker_Nav_Menu {
public function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n";
}
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
@ericelliott
ericelliott / essential-javascript-links.md
Last active July 18, 2024 15:03
Essential JavaScript Links
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@dziudek
dziudek / .txt
Created January 29, 2014 10:22
HTACCESS - redirect subdomain to subdirectory
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain\.yourdomain\.com
RewriteRule ^(.*)$ http://www\.yourdomain\.com/subdomain/$1 [L]
@bobholt
bobholt / resources.md
Last active August 30, 2016 05:24
JavaScript Development Resources

This is a work in progress. If I missed something or someone, please let me know!

Best Practices

It's hard to recommend best practices in general without context, but basically, writing clean, readable code with lots of comments, and doing a lot of automated unit testing, followed by an automated build process using ANT or Grunt to concatenate and minify files is a start.

Twitter

I don't focus much on blogs any more. I focus more on Twitter. If the people I follow there recommend something, I'll go read it. Here's the best of my Twitter list, including developers, conferences, and interesting groups. There are other great developers on Twitter, but these tweet mostly about development:

Developers

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@dziudek
dziudek / dabblet.css
Created June 4, 2013 07:01
CSS Loader - bordered dot
/**
* CSS Loader - bordered dot
*/
#loader {
animation-name: timer;
animation-duration: 0.75s;
animation-iteration-count: infinite;
animation-timing-function: linear;
border: 2px solid #aaa;
@dziudek
dziudek / mootools.placeholder.polyfill.js
Created May 26, 2013 21:45
IE <= 9 placeholder polyfill in MooTools
window.addEvent('domready', function() {
document.getElements('*[placeholder]').each(function(el) {
if(el.get('value') === '') {
el.set('value', el.getProperty('placeholder'));
}
el.addEvents({
'focus': function() {
if(el.get('value') === el.getProperty('placeholder')) {
el.set('value', '');
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@leostratus
leostratus / webkit-pseudo-elements.md
Created September 21, 2012 01:44
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;