Skip to content

Instantly share code, notes, and snippets.

View martpie's full-sized avatar
🇨🇵

Pierre de la Martinière martpie

🇨🇵
View GitHub Profile
@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu
@metaist
metaist / bootstrap-vertical-grid.css
Created November 24, 2013 21:06
Bootstrap vertical grid. For laying out full-screen fixed height webapps.
.container-fixed {
bottom: 0;
position: fixed;
left: 0;
right: 0;
top: 0;
}
.container-fixed .col {
height: 100%;
@yyx990803
yyx990803 / commits.vue
Last active May 13, 2022 16:43
Vue examples comparisons in 2.x and function-based APIs
<template>
<div id="demo">
<h1>Latest Vue.js Commits</h1>
<template v-for="branch in branches">
<input type="radio"
:id="branch"
:value="branch"
name="branch"
v-model="currentBranch">
<label :for="branch">{{ branch }}</label>
import {action1, action2} from "myActions";
import {bindActionCreators} from "redux";
const mapDispatchToProps(dispatch) => {
return {
manuallyBoundAction : (...args) => dispatch(action1(...args)),
autoBoundAction : bindActionCreators(action2, dispatch),
multipleActionsTogether : bindActionCreators({action1, action2}, dispatch)
}
};
@KrofDrakula
KrofDrakula / index.md
Created September 5, 2012 16:53
WebKit image rendering performance

Rendering performance on WebKit

Please send any feedback on this article to Klemen Slavič

UPDATE: I'm currently in the process of updating the article, as my assumptions about the inner workings of WebKit are incorrect. I will update this article with the relevant facts and provide concrete information in place of my guesstimates below.

I've recently stumbled upon an interesting discovery regarding image rendering performance in most WebKit browsers. Namely, I've been developing a sprite animation component to implement a GIF animation replacement with better compression and performance, where I noticed that some animations appeared to be janky when using multi-frame spritesheets and clipping rectangles. Here's what I found out.

But first, a quick rundown of the basic functioning of the WebKit engine as I understand it.

@markerikson
markerikson / dispatching-action-creators.js
Last active May 2, 2020 14:27
Dispatching action creators comparison
// approach 1: define action object in the component
this.props.dispatch({
type : "EDIT_ITEM_ATTRIBUTES",
payload : {
item : {itemID, itemType},
newAttributes : newValue,
}
});
// approach 2: use an action creator function