Skip to content

Instantly share code, notes, and snippets.


Michael Gonzalez genomics-geek

View GitHub Profile
cschmidli / DataTable.ts
Last active Apr 17, 2019
Semantic UI Data Table Component
View DataTable.ts
import * as React from 'react';
import * as hash from 'object-hash';
import {
jbaxleyiii / test.js
Created Nov 15, 2016
react-apollo testing
View test.js
import { Component } from "react";
import { print } from "graphql-tag/printer";
import { graphql } from "react-apollo";
import { MockedProvider } from "react-apollo/test-utils";
import { addTypenameToDocument } from "apollo-client/queries/queryTransform";
import { mount } from "enzyme";
import { withSavedPayments, SAVED_ACCTS_QUERY } from "../";
matthewriley /
Created Jun 15, 2016
Install Git 2.9.0 from source on RHEL 7.x

Install Git 2.9.0 from source on RHEL 7.x

These are the Terminal commands I recently used (June 2016) to install Git 2.9.0 from source on RHEL 7.x. I ran this in a VirtualBox VM after a fresh install from the ISO.

You mileage will vary as the yum packages are updated over time. The yum install line below should include all the dependencies, at least it did for me. Depending upon how often you use yum update you may need to run yum --enablerepo=base clean metadata as su before you run the following commands.

cd ~/Downloads
yum install autoconf cpio curl-devel expat-devel gcc gettext-devel make openssl-devel perl-ExtUtils-MakeMaker zlib-devel
wget -O v2.9.0.tar.gz
View gist:44b2af928d2edebd4805
def set_up_dag_run(context, dag_run_obj):
dag_run_obj.payload = {"config": context["config"]}
dag_run_obj.run_id = str(uuid4())
print context
return dag_run_obj
def launch_workflow_command(args):
config_location = args.config_location
analysis_id = args.analysis_id
View webpack.config.js
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"

###Redux Egghead Video Notes###

####Introduction:#### Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.

Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.

####1st principle of Redux:#### Everything that changes in your application including the data and ui options is contained in a single object called the state tree

from django import forms
from django.contrib.auth.models import User
class UserProfileForm(forms.ModelForm):
class Meta:
model = User
fields = ['first_name', 'last_name', 'email']
Dr-Nikson /
Last active Jan 4, 2022
Auth example (react + redux + react-router)

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.