Skip to content

Instantly share code, notes, and snippets.

View ayoungh's full-sized avatar
:octocat:
Coffee and code

Anthony Young ayoungh

:octocat:
Coffee and code
View GitHub Profile
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Oceanic Next Color Scheme/Oceanic Next.tmTheme",
"draw_white_space": "all",
"font_face": "Fira Mono",
"font_size": 20,
"tab_size": 2,
"theme": "Brogrammer.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
@SachaG
SachaG / SbPage.jsx
Created May 22, 2016 09:48
A markdown page component for Nova
/*
This component fetches a .md file and renders it as an HTML page.
Dependencies: react, react-markdown
Note: a package file can only access assets in the same package. This means
this component needs to be live in the same package as your assets,
which means it can't be distributed as a separate package.
@seanemmel-ba
seanemmel-ba / poll_for_element_helper_fn.js
Created November 20, 2015 16:03
Helper function to poll for DOM els that don't exist on page load (helpful for Optimization platforms). The `this` context is set to the element you poll for in your callback function. Interval times out after 10s by default to prevent endless polling.
/**
* @package N/A
* @version 1.0
* @author Blue Acorn <[email protected]>, Sean Emmel <[email protected]>
* @copyright Copyright © 2015 Blue Acorn.
*/
/**
* @param {String} - the CSS selector for your element in question
@gokulkrishh
gokulkrishh / media-query.css
Last active April 18, 2025 14:56
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@paulirish
paulirish / what-forces-layout.md
Last active April 18, 2025 15:29
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@seanemmel-ba
seanemmel-ba / OptimizelyDebugger.js
Last active February 14, 2018 20:50
A bookmarklet that enables you to retrieve information about active Optimizely experiments, variations, segments, cookies, and more, all in a GUI modal.
javascript:(function() {
/**
* @package N/A
* @version 1.0
* @author Blue Acorn <[email protected]>, Sean Emmel <[email protected]>
* @copyright Copyright © 2015 Blue Acorn.
*/
function Modal() {
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 18, 2025 02:49
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ldong
ldong / download_egghead_videos.md
Last active December 7, 2023 16:16
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@coolaj86
coolaj86 / README.md
Last active August 29, 2015 14:12
Getting Started with Vagrant