Skip to content

Instantly share code, notes, and snippets.

View codequistador's full-sized avatar

Justin Daining codequistador

View GitHub Profile
@codequistador
codequistador / learningCard.js
Created May 7, 2018 15:59
Learning Card API
<LearningCard
renderMedia={() => <LearningCardMedia data-selenium="media" url="" />}
renderFooter={() => <LearningCardFooter data-selenium="footer" />}
render () {
<CardFooter>{this.props.renderFooter(this.state.isFocused)}</CardFooter>
@codequistador
codequistador / game1.js
Created May 9, 2017 14:56
Starting Samer's game
const Stars = (props) => {
const numberOfStars = 1 + Math.floor(Math.random()*9);
return (
<div className="col-5">
{_.range(numberOfStars).map(i =>
<i key={i} className="fa fa-star"></i>
)}
</div>
)
const Card = (props) => {
return (
<div style={{margin: '1em'}}>
<img width="75" src={props.avatar_url} />
<div style={{display: 'inline-block', marginLeft: 10}}>
<div style={{fontSize: '1.25em', fontWeight: 'bold'}}>{props.name}</div>
<div>{props.company}</div>
</div>
</div>
);
class Button extends React.Component {
handleClick = () => {
this.props.onClickFunction(this.props.incrementValue);
};
render() {
return (
<button
onClick={this.handleClick} >
+{this.props.incrementValue}

Keybase proof

I hereby claim:

  • I am codequistador on github.
  • I am jdaing (https://keybase.io/jdaing) on keybase.
  • I have a public key ASB4_1qpgBM_ShcClWrAHZvpj8TE9a9aEGas0RKZTzLR6Ao

To claim this, I am signing this object:

@codequistador
codequistador / easy-takover.js
Last active January 14, 2016 18:59
Easy Homepage Takover
$(document).ready(function() {
var id = '#dialog';
//Get the screen height and width
var maskHeight = $(document).height();
var maskWidth = $(window).width();
//Set heigth and width to mask to fill up the whole screen
$('#mask').css({'width':maskWidth,'height':maskHeight});
@codequistador
codequistador / overlay.scss
Created November 2, 2015 23:56
CSS Overlay
overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(88, 89, 91, .5);
z-index: 1;
}
@codequistador
codequistador / google-event-tracking.js
Created September 24, 2015 20:24
Event Tracking JQuery
var event_tracking = [
//id, category, label
[ '#pnav ul li ul li a', 'nav', 'top nav' ],
[ '#pnav-reg', 'cta', 'top nav registration' ],
[ '#hero-reg', 'cta', 'hero registration' ],
[ '#early-reg', 'cta', 'early registration' ],
[ '#why-reg', 'cta', 'why registration' ],
[ '#fam-reg', 'cta', 'family discovery registration' ],
[ '#fourday-reg', 'cta', 'four day registration' ],
[ '#oneday-reg', 'cta', 'one day registration' ],
@codequistador
codequistador / rtmsup.js
Created June 10, 2015 17:43
R and TM get Sup
//Ensure all registered marks and trademarks have sup tags!
$('body *').contents().filter(function () {
if (((this.nodeType == 3) && this.nodeValue.match(/(®|™)/))) {
if (!$(this).parent().is('sup')) {
var newText = [];
$.each(this.nodeValue.split(" "), function (k, text) {
newText.push(text.replace(/(®|™)/, "<sup>$1</sup>"));
});
if (newText.length > 0) {
var html = $(this).parent().html().replace(this.nodeValue, newText.join(" "));
@codequistador
codequistador / packsize-fancy-nav.js
Created June 10, 2015 17:42
Packsize Fancy Nav
/** SCRIPT FOR PRIMARY NAVIGATION **/
var primaryMenu = $("#pnav");
var primaryMenuItems = ["solutions", "resources", "company"];
$(window).on("load resize scroll", function () {
var head_row = $("#header_row").offset().left;
$.each(primaryMenuItems, function (k, v) {
if (primaryMenu.find("." + v).length) {