Skip to content

Instantly share code, notes, and snippets.

🤓
Code it!

Alex Kanunnikov lifeart

🤓
Code it!
Block or report user

Report or block lifeart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lifeart
lifeart / readme.md
Last active Jun 13, 2018
Ember relationships rollback
View readme.md
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'],
@pioh
pioh / core.scss
Last active Feb 22, 2018
webpack scss config
View core.scss
@import '~react-select/dist/react-select.css';
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
font-size: 13px;
@caseywatts
caseywatts / 0 README.md
Last active Jun 1, 2018
d3 & c3 npm shim to es6 module for Ember
View 0 README.md
@Rich-Harris
Rich-Harris / service-workers.md
Last active Jan 26, 2020
Stuff I wish I'd known sooner about service workers
View service-workers.md

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

View TBezierInterpolation.cpp
#include <vector>
#include <iostream>
#include <cmath>
using namespace std;
#define EPSILON 1.0e-5
#define RESOLUTION 32
class Point2D
@listochkin
listochkin / Ссылки-JSunderhood
Created May 31, 2015
Неделя jsunderhood. Все ссылки, которыми я с вами поделился
View Ссылки-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
@goncalossilva
goncalossilva / gifenc.sh
Last active Jan 21, 2020
Handy scripts to encode mp4, webm and gif using ffmpeg (2.6 or above). Audio is discarded on all of these!
View gifenc.sh
#!/bin/sh
# sh gifenc.sh input.mp4 output.gif
# Optionally accepts width / height (one or both).
palette="/tmp/palette.png"
filters="fps=15"
if [ ! -z $3 ]; then
if [ ! -z $4 ]; then
filters="$filters,scale=$3:$4"
@revolunet
revolunet / browserify.js
Last active Jan 9, 2018
Sample split grunt-browserify config for vendors + applications files with react
View browserify.js
var externalModules = [
'fs',
'events',
'react',
'react-addons',
'lodash'
];
module.exports = {
vendors: {
@listochkin
listochkin / ember.js-videos.md
Last active Nov 14, 2017
Ember.js Video Collection
View ember.js-videos.md
  1. Официальные видео:
  2. Toran Billups записал очень хорошие базовые видео:
  3. Архитектура:
@michiel
michiel / cors-nginx.conf
Created Jul 5, 2011
Wide-open CORS config for nginx
View cors-nginx.conf
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
You can’t perform that action at this time.