Skip to content

Instantly share code, notes, and snippets.

View samikeijonen's full-sized avatar
🏠
Working from home

Sami Keijonen samikeijonen

🏠
Working from home
View GitHub Profile
<?php if ( ! is_wp_error( $topics ) && ! empty( $topics ) ) : ?>
<div class="cats" data-filter="cat">
<h4><?php pll_e( 'Valitse aihe' ) ?></h4>
<ul>
<li><a href="<?php echo get_term_link( $term_id ); ?>"<?php echo ( ! isset( $_GET['cat'] ) ) ? ' class="selected"' : ''; ?>><?php _e( 'Kaikki' ) ?></a></li>
<?php foreach ( $topics as $topic ) : ?>
<li>
<a href="<?php echo yeahboy_make_filter_url( $base_url_term_id, 'cat', $topic->term_id ) ?>" data-id="<?php echo $topic->term_id ?>" <?php echo ( $_GET['cat'] == $topic->term_id ) ? ' class="selected"' : ''; ?>>
<?php echo $topic->name ?>
</a>

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

@tomhodgins
tomhodgins / map-test.js
Last active May 3, 2019 06:47
run with -> $deno map-test.js | prettier --parser css > output.css
const listMapper = (list, template) => list.map(template).join('\n')
const objectMapper = (object, template) => Object.entries(object).map(template).join('\n')
console.log(
listMapper(
[
'red',
'blue',
'green'
],
function removeDropCap(settings, name) {
if (name !== 'core/paragraph') {
return settings;
}
let newSettings = Object.assign({}, settings);
if (newSettings.supports &&
newSettings.supports.__experimentalFeatures &&
newSettings.supports.__experimentalFeatures.typography &&
newSettings.supports.__experimentalFeatures.typography.dropCap) {
newSettings.supports.__experimentalFeatures.typography.dropCap = false