Skip to content

Instantly share code, notes, and snippets.

View domyen's full-sized avatar

Dominic Nguyen domyen

View GitHub Profile
Started GET "/get_started/make" for 127.0.0.1 at 2011-11-10 19:08:23 -0800
Processing by GetStartedController#make as HTML
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Rendered get_started/_first_steps.html.erb (3.1ms)
Rendered get_started/make.html.erb within layouts/application (119.4ms)
Rendered application/_header.html.erb (5.9ms)
Compiled screen.css (15658ms) (pid 14040)
Compiled application.js (75ms) (pid 14040)
Compiled external/jquery-1.5.1.js (93ms) (pid 14040)
Compiled external/jquery.ui/jquery.ui.core.js (1ms) (pid 14040)
td {
>img:nth-of-type(4){
display:none
}
}
@domyen
domyen / CommentListContainer.jsx
Last active March 29, 2017 20:35
Data container component example (via @chantastic)
// CommentListContainer.jsx (DATA)
class CommentListContainer extends React.Component {
constructor() {
super();
this.state = { comments: [] }
}
componentDidMount() {
$.ajax({
@domyen
domyen / CommentList.jsx
Last active April 10, 2017 21:55
Presentational component example (via @chantastic)
// CommentList.jsx (PRESENTATION)
class CommentList extends React.Component {
constructor(props) {
super(props);
}
render() {
return <ul> {this.props.comments.map(renderComment)} </ul>;
}
@domyen
domyen / CommentList.jsx
Last active April 10, 2017 21:56
Single-use component example (via @chantastic)
// CommentList.jsx (DATA + PRESENTATION)
// inspired by Michael Chan https://gist.github.com/chantastic/fc9e3853464dffdb1e3c
class CommentList extends React.Component {
constructor(props) {
super(props);
this.state = { comments: [] }
}
componentDidMount() {
@domyen
domyen / CommentList.js
Last active May 11, 2017 18:06
CommentList.js (GOOD)
import React from 'react';
export default function CommentList({comments}) {
return (
<div className="commentList">
{comments.map(({text, author: {name, avatar, url}}) => (
<div className="commentItem">
<div className="avatar"><img src={avatar} /></div>
<div className="message">
<span className="author"><a href={url}>{name}</a></span>
@domyen
domyen / CommentList.js
Last active May 17, 2017 17:30
CommentList.js NONREUSABLE
import React from 'react';
export default function CommentList({comments}) {
return (
<div className="commentList">
{comments.map(({commentText, characterName, characterAvatar, characterId}}) => (
<div className="commentItem">
<div className="avatar"><img src={characterAvatar} /></div>
<div className="message">
<span className="author"><a href=`/character/${characterId}`>{characterName}</a></span>
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@domyen
domyen / gist:9a0e58d0b99139afd2fe07dd288397be
Last active January 28, 2019 20:45
SB 5.0 design todo
Todo
- Add Badge component from /frontpage
- Add Button component from /frontpage
- Add Link component from /frontpage
- Add Subheading component from /frontpage
UI bugs
- Correct sidebar spacing
- Add-on titles should have a system default focus not what is currently there now
- CSS scrollbars
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A pull request is ready for review."
}
},
{