Skip to content

Instantly share code, notes, and snippets.

View DSchau's full-sized avatar

Dustin Schau DSchau

View GitHub Profile
@leonderijke
leonderijke / README.md
Last active January 19, 2023 15:18
Front Export: Little export script for exporting all conversations in a Front App inbox

Front export

✋ Heads up! This code uses the Front API V1, which is deprecated. @niklasravnsborg took this project further and created a Front API V2 compatible version: https://github.com/niklasravnsborg/front-export 🎉

Little export script for exporting all conversations in a Front inbox, using the Front API.

When using the awesome Front App, you want to export all conversations in an inbox. For example, for backup purposes.

Three environment variables are needed:

@thevangelist
thevangelist / my-component.spec.js
Created August 4, 2016 13:06
The only React.js component test you'll ever need (Enzyme + Chai)
import React from 'react';
import { shallow } from 'enzyme';
import MyComponent from '../src/my-component';
const wrapper = shallow(<MyComponent/>);
describe('(Component) MyComponent', () => {
it('renders without exploding', () => {
expect(wrapper).to.have.length(1);
});
@bendc
bendc / easing.css
Created September 23, 2016 04:12
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@mattdsteele
mattdsteele / README.md
Last active March 14, 2017 22:31
Electoral College Basketball

Bracketology based on the 2016 presidential election.

Schools advance based on whichever county had the higher Hillary Clinton vote percentage. Maryland is going to take it all with 85%, apparently.

Methodology

@betaorbust
betaorbust / README.md
Last active July 21, 2018 19:57
ES2015 fallback check for Progressive Transpilation

ES2015 Syntax Check for use with Progressive Transpilation

The attached file file spits out a string for direct injection into the head of a page, which will be a lightweight test of the ability to parse and run ES2015 syntax.

Unminified version

This is the original source for the test-case below:

class ಠ_ಠ extends Array{
@shyiko
shyiko / deployment_to_gitlab_pages.md
Created April 10, 2017 04:06
Deploying to GitLab Pages (on each push)

(assuming project is hosted on GitLab)

  1. Enable shared runners by going to "Settings" > "Runners".
  2. Add .gitlab-ci.yml with the following content:
image: node:6.9.1
pages: 
  artifacts: 
paths: 
@threepointone
threepointone / glam-for-css-folks.md
Last active September 4, 2022 07:43
why css purists will love glam

I made a little styling lib called glam

(some features are in development)

one

let's start off with the simplest use case. we'll make an 'index.html' page, and assume we've setup our js bundler to output bundle.js

@aantipov
aantipov / react2ng1.js
Last active October 4, 2022 18:52
A simple way to convert React components into AngularJS components
import React from "react";
import ReactDOM from "react-dom";
import { fromPairs, map, pick } from "ramda";
/**
* Wraps a React component into Angular component. Returns a new Angular component.
*
* Usage: angular.module('some.module').component('newAngularComponent', react2angular(MyReactComponent))
* (the usage is the same as in similar lib https://github.com/coatue-oss/react2angular)
*/
@joshwcomeau
joshwcomeau / FitText.js
Created December 29, 2017 00:24
FitText port
// @flow
// Reimplementation of the jQuery plugin "FitText"
// https://github.com/davatron5000/FitText.js/blob/master/jquery.fittext.js
import React, { PureComponent } from 'react';
type Props = {
compressor: number,
children: React$Node,
};