Skip to content

Instantly share code, notes, and snippets.

View imjul1an's full-sized avatar

Julian U. imjul1an

View GitHub Profile
@imjul1an
imjul1an / .spacemacs
Created July 28, 2017 12:35 — forked from rhalukongor/.spacemacs
Use ESLint from project folder
(defun my/use-eslint-from-node-modules ()
(let ((root (locate-dominating-file
(or (buffer-file-name) default-directory)
(lambda (dir)
(let ((eslint (expand-file-name "node_modules/eslint/bin/eslint.js" dir)))
(and eslint (file-executable-p eslint)))))))
(when root
(let ((eslint (expand-file-name "node_modules/eslint/bin/eslint.js" root)))
(setq-local flycheck-javascript-eslint-executable eslint)))))
@imjul1an
imjul1an / pubsub-simple.js
Created July 6, 2017 22:18 — forked from fatihacet/pubsub-simple.js
Simple PubSub implementation with JavaScript - taken from Addy Osmani's design patterns book -
var pubsub = {};
(function(q) {
var topics = {}, subUid = -1;
q.subscribe = function(topic, func) {
if (!topics[topic]) {
topics[topic] = [];
}
var token = (++subUid).toString();
topics[topic].push({
token: token,
@imjul1an
imjul1an / RouteTransition.jsx
Created August 22, 2016 07:16 — forked from maisano/RouteTransition.jsx
Using react-motion with react-router
import React, { PropTypes } from 'react';
import { TransitionMotion, spring } from 'react-motion';
/**
* One example of using react-motion (0.3.0) within react-router (v1.0.0-rc3).
*
* Usage is simple, and really only requires two things–both of which are
* injected into your app via react-router–pathname and children:
*
* <RouteTransition pathname={this.props.pathname}>
@imjul1an
imjul1an / health.md
Last active February 19, 2016 16:17
Eating and workout recorder

##Weight goal: 72kg
##Estimate in weeks: 13w
##Weeks left: 10w

Week 1

######Weight: 85.0kg

Food: 80% Good Food: fish, chicken, rice, vegetables, fruits, water 2L/d