Skip to content

Instantly share code, notes, and snippets.

View hudochenkov's full-sized avatar

Aleks Hudochenkov hudochenkov

View GitHub Profile
// The core app code
var myApp = (function () {
'use strict';
// Create a public methods object
var methods = {};
/**
* Extend the public methods object
import React, { Component, PropTypes } from 'react';
class OutsideClick extends Component {
static propTypes = {
children: PropTypes.any,
onClick: PropTypes.func.isRequired,
id: PropTypes.string,
tag: PropTypes.string,
className: PropTypes.string
}
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@jonathantneal
jonathantneal / README.md
Last active March 19, 2024 23:31
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@JeremyMorgan
JeremyMorgan / head.html
Last active December 13, 2015 20:28
Some Liquid tags for adding in Opengraph data in your meta tags for Octopress
{% if page.title %}<meta property="og:title" content="{{ page.title }}" /><meta itemprop="name" content="{{ page.title }}" />{% endif %}
{% if page.author %}<meta name="author" content="{{ site.author }}" />
<meta property="article:author" content="https://plus.google.com/+JeremyMorgan" />
<meta property="og:type" content="article" />{% endif %}
{% if page.date %}<meta property="article:published_time" content="{{ page.date }}" />{% endif %}
{% capture category %}{% if page.categories %}{{ page.categories }}{% endif %}{% endcapture %}
{% if page.categories %}<meta property="article:section" content="{{ page.categories }}" />{% endif %}
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}" />
<meta property="og:description" content="{{ description | strip_html | condense_spaces | truncate:150 }}" />