Skip to content

Instantly share code, notes, and snippets.

View robertwbradford's full-sized avatar

Robert Bradford robertwbradford

View GitHub Profile
@robertwbradford
robertwbradford / react-slots.js
Created August 14, 2020 19:36
React Slot Pattern
const Layout = ({ slot1, slot2 }) => {
return (
<div>
<div>{slot1}</div>
<div>{slot2}</div>
</div>
);
};
const MyApp = () => <Layout slot1={<p>Hello</p>} slot2={<p>world</p>} />;
@robertwbradford
robertwbradford / HTMLComment.jsx
Last active August 30, 2018 21:09 — forked from alexeychikk/ReactComment.jsx
Simple React HTML comment
/*
This is a stripped down fork of https://gist.github.com/alexeychikk/bfe72a072a9a962f2da900b6151e4aae
<HTMLComment text="This will be displayed in an HTML comment" />
*/
import React, { Component } from "react";
import ReactDOM from "react-dom";
export default class HTMLComment extends Component {
componentDidMount() {
/**
* Copyright Marc J. Schmidt. See the LICENSE file at the top-level
* directory of this distribution and at
* https://github.com/marcj/css-element-queries/blob/master/LICENSE.
*/
;
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define(factory);
} else if (typeof exports === "object") {
source 'http://rubygems.org'
gem 'rake', '0.8.7'
gem 'rack', '1.2.2'
gem 'daemon_controller', '0.2.5'
gem 'rails', '3.0.7'
gem 'jquery-rails', '~> 1.0.19'
gem 'mysql2', '0.2.7'
gem 'acts_as_list_with_sti_support', '~> 1.0.3'
gem 'acts_as_tree', '~> 0.1.1'
0 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/spec_set.rb 90 in `block in materialize'
1 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/spec_set.rb 83 in `map!'
2 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/spec_set.rb 83 in `materialize'
3 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/definition.rb 127 in `specs'
4 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/definition.rb 172 in `specs_for'
5 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/definition.rb 161 in `requested_specs'
6 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/environment.rb 23 in `requested_specs'
7 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 11 in `setup'
8 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler.rb 107 in `setup'
9 /.../.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/setup.rb 17 in `'
$ gem list
*** LOCAL GEMS ***
aaronh-chronic (0.3.9)
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (3.0.7)
activemodel (3.0.7)
activerecord (3.0.7)
ORIGINAL PLUGINS
---------------------------------------------
Admin Menu Editor (1.1.5)
Advanced Text Widget (2.0.0)
Akismet (2.5.5)
Capability Manager (1.3.2)
Custom Templates For All Post Types (1.0)
Footer Stuff (1.0)
Google Analyticator (6.2)
Google Website Optimizer for WordPress (2.0)
@robertwbradford
robertwbradford / gist:1672392
Created January 24, 2012 20:32
~/log/sunspot-solr-development.log after running $ rake sunspot:solr:start
Jan 24, 2012 3:30:27 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Jan 24, 2012 3:30:27 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: using system property solr.solr.home: /Users/robert/Projects/Office/Code/office/solr
Jan 24, 2012 3:30:27 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/Users/robert/Projects/Office/Code/office/solr/'
Jan 24, 2012 3:30:27 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Jan 24, 2012 3:30:27 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
@robertwbradford
robertwbradford / gist:1281646
Created October 12, 2011 16:02
Resize table columns within a container
<!DOCTYPE html>
<html>
<head>
<title>Resize table columns within a container</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/redmond/jquery-ui.css" type="text/css" />
<style type="text/css" media="screen">
body{margin:0;padding:0;background:#66F;}
#frame{background:#FFF;margin:100px;border:3px solid #ccc;overflow-x:scroll;}
@robertwbradford
robertwbradford / gist:1058833
Created July 1, 2011 16:01
redcarpt gem error
$ bundle
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using aaronh-chronic (0.3.9)
Using abstract (1.0.0)
Using activesupport (3.0.7)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.7)
Using erubis (2.6.6)