Skip to content

Instantly share code, notes, and snippets.

View cnocon's full-sized avatar
:octocat:
Professionally developing

Cristin O'Connor cnocon

:octocat:
Professionally developing
View GitHub Profile
import React, { useState } from 'react';
function App() {
const [ score, setScore ] = useState(0);
const [ message, setMessage ] = useState('Welcome!');
return (
<div className="App">
<header className="App-header">
<h1>{ message }</h1>
import React, { useState } from 'react';
function App() {
const [ score, setScore ] = useState(0);
const [ message, setMessage ] = useState('Welcome!');
return (
<div className="App">
<header className="App-header">
<h1>{ message }</h1>
.selector {
display: block;
}
@cnocon
cnocon / README.md
Created July 30, 2020 20:38 — forked from elclanrs/README.md
VanillaJS popover with autoposition
@cnocon
cnocon / a-one
Created May 30, 2020 22:57
blog snippet
git for-each-ref --sort=-committerdate refs/heads/ --color --format="%(HEAD)%(color:bold)%(refname:short)%(color:reset);%(color:green)%(committerdate:relative)%(color:reset);%(committerdate:format:'%m/%d/%Y\ %H:%M');%(color:cyan)%(authorname)%(color:reset);%(color:yellow)%(objectname:short)%(color:reset) %(color:italic)%(contents:subject)%(color:reset)" | column -t -s ";"
@cnocon
cnocon / rspec_rails_cheetsheet.rb
Created August 5, 2016 03:19 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
@cnocon
cnocon / usdish-utlity-classes.scss
Last active March 28, 2020 06:31
Utility Classes Example
@mixin adaptive-classes {
@content;
&--sm,
&--sm-only {
@include small { @content; }
}
&--sm-up {
@include small-up { @content; }
@cnocon
cnocon / zoo.js
Created February 27, 2014 17:16 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------
@cnocon
cnocon / zoo.js
Created February 27, 2014 16:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.