Skip to content

Instantly share code, notes, and snippets.

morsdyce /
Last active May 30, 2022 — forked from adamkleingit/
Timer App

Timer App

Please create an app for managing timed tasks.

  1. The user can input a text and click Add
  2. A new task is added with the title, and 00:00 time, and a play button.
  3. Clicking Play will play this task: the timer will start running, and the icon will change to a pause icon. Also - any other running task will be paused.
  4. Clicking Pause will pause the task.
  5. The total time is always updated.
morsdyce / hoc-template.tsx
Created Oct 23, 2019 — forked from rosskevin/hoc-template.tsx
Typescript higher order component (hoc) template
View hoc-template.tsx
/* variation on */
import * as React from 'react'
import { wrapDisplayName } from 'recompose'
// Props you want the resulting component to take (besides the props of the wrapped component)
interface ExternalProps {}
// Props the HOC adds to the wrapped component
export interface InjectedProps {}
morsdyce /
Created Aug 14, 2017 — forked from nk9/
Python script to find the largest files in a git repository.
# -*- coding: utf-8 -*-
# Python script to find the largest files in a git repository.
# The general method is based on the script in this blog post:
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects.

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.


Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

morsdyce /
Last active Mar 7, 2019
Introduction to BDSM - ReactiveConf Lightning talk proposal

This is a proposal for a lightning talk at the Reactive 2016 conference.

🌟Star this gist if you want to see it on the conference.

Introduction to BDSM

Every day we work with multiple teams to build our products, communication and sync are key factors to deliver your product on time without compromising quality.

In this talk I will introduce BDSM a new mocking tool that will change the way you coordinate between client and server teams minimizing friction allowing each team to work at its own pace while keeping in sync.

morsdyce / gist:b5c5a307102216af2261820c24c7f65a
Created Jul 7, 2016 — forked from ydn/gist:320165
Use YQL to convert XML to JSON in your sleep
View gist:b5c5a307102216af2261820c24c7f65a
<!-- Use YQL to convert XML to JSON in your sleep -->
<!-- Introduced in YDN blog post: -->
<script src=""></script>
<ul>UN Headlines:</ul>
var Y = new YUI();
function handleResponse ( json ) {
var items = json.query.results.item;
for ( var i = 0; i < items.length; i++ ) {
View webpack-karma-warnings-plugin.js
* This plugin makes sure karma doesn't run any specs when there's a
* compilation error in a module by including a module even if the module has errors.
* Webpack's normal behaviour is to not include modules which have errors,
* which causes Karma to run all the tests without the failed spec.
* Some links to where this magic actually happens in Webpack:
View karma-webpack-warnings-plugin.js
var webpackConfig = {
plugins: [
// Plugin to show any webpack warnings and prevent tests from running
function () {
this.plugin("done", function (stats) {
if (stats.compilation.warnings.length) {
// Log each of the warnings
stats.compilation.warnings.forEach(function (warning) {
console.log(warning.message || warning);
morsdyce /
Created Sep 28, 2015 — forked from paulirish/
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()