Skip to content

Instantly share code, notes, and snippets.

View emil-alexandrescu's full-sized avatar
🏠
Working from home

Emil Alexandrescu emil-alexandrescu

🏠
Working from home
  • Bucharest, Romania
View GitHub Profile
$ fab
Traceback (most recent call last):
File "c:\Python34\Scripts\fab-script.py", line 5, in <module>
from pkg_resources import load_entry_point
File "C:\Python34\lib\site-packages\pkg_resources.py", line 2697, in <module>
working_set.require(__requires__)
File "C:\Python34\lib\site-packages\pkg_resources.py", line 669, in require
needed = self.resolve(parse_requirements(requirements))
File "C:\Python34\lib\site-packages\pkg_resources.py", line 572, in resolve
raise DistributionNotFound(req)
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@emil-alexandrescu
emil-alexandrescu / Dockerfile
Created October 24, 2017 22:40 — forked from remarkablemark/Dockerfile
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
@emil-alexandrescu
emil-alexandrescu / typeahead.test.js
Created January 26, 2018 15:48
Typeahead unit test
import React from 'react';
import { shallow, mount } from 'enzyme';
import Typeahead from 'components/Typeahead';
describe('components', () => describe('<Typeahead />', () => {
let props = {};
let options = [];
beforeEach(() => {
options = [
@emil-alexandrescu
emil-alexandrescu / withQuery.js
Created February 26, 2019 16:04
HOC to take control of search query on url
import React, { Component } from 'react';
import { updateQuery, getQuery, getPathname } from 'lib/history';
import capitalize from 'lodash/capitalize';
import mergeWith from 'lodash/mergeWith';
import merge from 'lodash/merge';
import isArray from 'lodash/isArray';
import isObject from 'lodash/isObject';
function withQuery(name, defaultValues, storeCache = false, cacheIgnoredValues = []) {
return function(WrappedComponent) {
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Scrollbars } from 'react-custom-scrollbars';
import { listenClick } from 'lib/utils';
import './style.scss';
export const Tooltip = ({ items }) => (
<ul className="tooltip__list-tooltip">
{items.map(item =>
const _ = require('lodash');
const moment = require('moment');
const shortid = require('shortid');
const Promise = require('bluebird');
const User = require('../models/user');
const Team = require('../models/team');
const RoleService = require('../services/role.service');
const APIError = require('../utils/api-error');
const sendEmail = require('../utils/send-mail');
const config = require('../../config/config');
import React from 'react';
import PropTypes from 'prop-types';
import { graphql } from 'react-apollo';
import { GET_CURRENT_USER } from './withUser';
import { localStorage } from '@common/lib';
import gql from 'graphql-tag';
export const LOGIN_MUTATION = gql`
mutation loginMutation($usernameOrEmail: String!, $password: String!) {
loginUser(usernameOrEmail: $usernameOrEmail, password: $password) {
/* eslint-disable react/display-name */
import React from 'react';
import { shallow } from 'enzyme';
import { Redirect } from 'react-router';
import withAuthGuard from '../withAuthGuard';
jest.mock('../withUser');
import withUser from '../withUser';
const AnyComponent = () => <div>Emil is Awesome</div>;

React Native Coding Challenge

IMPORTANT! Please do not use Expo.

In this challenge you're going to create a basic Reddit app with React Native.

Reddit is a news website where registered users can submit posts or links to content that other users can vote and comment. Each of these posts is grouped into categories known as "subreddits".

Your web app should list the last posts of the r/pics subreddit.