Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from "react";
import { findDOMNode } from "react-dom";
import * as R from "ramda";
class ScrollController extends Component {
constructor(props) {
super(props);
this.props.tabs.forEach(([key, comp]) => {
this[key] = React.createContext();
});
@therahl
therahl / ..git-pr.md
Created February 19, 2018 21:41 — forked from gnarf/..git-pr.md
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@therahl
therahl / .zshrc
Last active August 30, 2019 21:07 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
# User configuration
@therahl
therahl / snippets.cson
Created August 20, 2017 01:11
Atom cson snippets for react
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@therahl
therahl / index.html
Created June 14, 2015 16:28
theRahl weather
<html>
<body>
<div class="container">
<div class="row">
<div class="title">
Free Code Camp Zipline
</div>
<div class="subtitle">Local Weather App</div>
<div class="subtitle" id="title"></div>
<div class="location details" id="temperature"></div>
@therahl
therahl / console.sql
Created May 14, 2015 23:31
sql exercises working with store data
select * from customers join (select * from orders) as a on a.customerid = customers.customerid ORDER BY a.orderdate desc limit 1
select
customers.firstname,
customers.lastname,
array_agg(products.title),
from customers join
orders using (customerid) join
orderlines using (orderid) join
@therahl
therahl / console.sql
Created May 14, 2015 21:23
learning postgresql exercises
WITH bigarea as (SELECT * from country ORDER BY surfacearea desc limit 10)
select language from countrylanguage join bigarea on code = countrycode
select sum(population) from country join (select* from countrylanguage where language = 'English') AS sub2 on code = countrycode
select name from country join (select * from countrylanguage where isofficial is false) as sub7 on code = countrycode
select country.name from country LEFT OUTer join city on (country.code = city.countrycode) WHERE city.id is null