Skip to content

Instantly share code, notes, and snippets.

var cx = require('bem-classnames')
, Close = require('../Close.jsx')
, ProgressButton = require('./ProgressButton.jsx')
var progressWheel = React.createClass({
render: function() {
var {animate, error, percent, playButton} = this.props
var classes = {
from scrapeMeta import scrapeMeta
import os
import json
from bs4 import BeautifulSoup
import urllib
def getHTML(url):
html = urllib.urlopen(url).read()
return BeautifulSoup(html)
@mcky
mcky / README.md
Created February 24, 2014 22:30 — forked from JoelBesada/README.md

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
*** Installing Pow 0.4.1...
*** Installing local configuration files...
*** Starting the Pow server...
*** Performing self-test...
*** Installed
For troubleshooting instructions, please see the Pow wiki:
https://github.com/37signals/pow/wiki/Troubleshooting
To uninstall Pow, `curl get.pow.cx/uninstall.sh | sh`
event = {
touches: [{
X: 100,
Y: 200
}, {
X: 300,
Y: 500
}]
};
<h1>RWD List to Table</h1>
<table class="rwd-table">
<tr>
<th>Movie Title</th>
<th>Genre</th>
<th>Year</th>
<th>Gross</th>
</tr>
<tr>
<td data-th="Movie Title">Star Wars</td>
@mcky
mcky / style.css
Created April 8, 2014 16:51
Centering
body {
background: #900;
}
div {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
6362 info postuninstall katon@0.4.2
6363 error katon@0.4.2 postinstall: `cat ./doc/update.txt && ./bin/index.js install`
6363 error Exit status 8
6364 error Failed at the katon@0.4.2 postinstall script.
6364 error This is most likely a problem with the katon package,
6364 error not with npm itself.
6364 error Tell the author that this fails on your system:
6364 error cat ./doc/update.txt && ./bin/index.js install
6364 error You can get their info via:
6364 error npm owner ls katon

Can't seem to loop through <Location> components using .map as I get the following error as it's being passed as a string:

Error: Invariant Violation: Route handler should be a component or a function but got: MainPage

Array in question and the component:

[{
	'path': '/',
	'handler': 'MainPage'
@mcky
mcky / mixin.scss
Last active August 29, 2015 14:16
Hope this makes sense? Even if it's possible doubt it'd work with compound selectors though
$aList: (
one
, two
, three
, four
);
// So $elem is the name of the selector it was called from (.one, #two etc)
@mixin myMixin($elem) {
$value: index(&aList, $elem);