Skip to content

Instantly share code, notes, and snippets.

View lifeart's full-sized avatar
🐹
Working from home

Alex Kanunnikov lifeart

🐹
Working from home
View GitHub Profile
@revolunet
revolunet / browserify.js
Last active January 9, 2018 15:18
Sample split grunt-browserify config for vendors + applications files with react
var externalModules = [
'fs',
'events',
'react',
'react-addons',
'lodash'
];
module.exports = {
vendors: {
@pioh
pioh / core.scss
Last active February 22, 2018 23:32
webpack scss config
@import '~react-select/dist/react-select.css';
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
font-size: 13px;
@listochkin
listochkin / Ссылки-JSunderhood
Created May 31, 2015 13:49
Неделя jsunderhood. Все ссылки, которыми я с вами поделился
Неделя jsunderhood. Все ссылки, которыми я с вами поделился
http://blog.vjeux.com/2014/javascript/react-css-in-js-nationjs.html
http://bost.ocks.org/mike/algorithms/
http://cdn.mozilla.net/pdfjs/tracemonkey.pdf
http://confreaks.tv/videos/keeprubyweird14-opening-keynote
http://confreaks.tv/videos/rubyconf2014-the-social-coding-contract
http://eldar.djafarov.com/2013/11/reactjs-mixing-with-backbone/
http://ember.js/posts/animations-in-emberjs-with-liquidfire
http://frameworksdays.com/event/mk-listochkin-emberjs/participants
@caseywatts
caseywatts / 0 README.md
Last active June 1, 2018 22:18
d3 & c3 npm shim to es6 module for Ember
@lifeart
lifeart / readme.md
Last active June 13, 2018 15:43
Ember relationships rollback
const { Model, belongsTo, hasMany } = DS;
import { alias } from '@ember/object/computed';
import RollbackMixin from '../../mixins/rollbackable';


export default Model.extend(RollbackMixin, {
    rollabackable: computed(function(){
        return {
 hasMany: ['items', 'users'],
#include <vector>
#include <iostream>
#include <cmath>
using namespace std;
#define EPSILON 1.0e-5
#define RESOLUTION 32
class Point2D
class FetchTask {
@tracked isLoading = true;
@tracked result;
constructor(url) {
this.run(url);
}
async run(url) {
let response = await fetch(url);
@lukemelia
lukemelia / 1-summary.md
Last active July 2, 2020 19:41
Simple component theming with broccoli.js

My team and I have been working on a new internal component library to share across a few Ember apps. The library is an Ember addon in a private github repo. So far, so good. The off-the-beaten-path part of our requirements is that the components need to be themeable. Specifically, we support a color and a "light" or "dark" aesthetic.

We want a great developer experience for creating and updating these components, so we used ember-freestyle as a devDependency of the library to create a living style guide. We added some UI to allow theme switching and even a checkbox to switch themes every second (thanks ember-concurrency!).

The thing that gave us the biggest challenge was figuring out how to author and apply the styles that were necessarily dynamic. Specifically, the css rules that used the dynamic color.

We decided to organize our styles like so:

app/styles/components/
//How to use
<Pagination
@count={{@model.typefaces.meta.count}}
@current={{this.page}}
@perPage={{this.commonData.perPage}}
@model={{@model.entity.slug}}
/>
<Pagination
@dcramer
dcramer / .zshrc
Last active April 5, 2021 20:37
zsh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
source <(antibody init)
antibody bundle < ~/.config/zsh_plugins
# TODO(dcramer): literally doesnt work at all
# function update_antibody() {
# antibody bundle < ~/.config/zsh_plugins > ~/.config/zsh_plugins.sh
# }