Skip to content

Instantly share code, notes, and snippets.

@mcky
mcky / SassMeister-input.scss
Created September 25, 2015 16:18
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
$color: #ff00cc;
.selector {
color: darken($color, 20%);
.nested {
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)
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 = {
@mcky
mcky / data.json
Last active August 29, 2015 14:20
{
"text":"project title",
"stakeholders":[
{
"text":"a stakeholder",
"outcomes":[
{
"text":"Another outcome",
"indicators":[
{
sudo apt-get update
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug
@mcky
mcky / secret.py
Created April 14, 2015 23:52
Secret 7"
import os,urllib2
for i in range(1, 701):
imgNum = str(i).zfill(3)
out = os.path.join("/Users/r/Desktop/secret7","img-%s.jpg" % imgNum)
url = "http://d1li66az0g7v6o.cloudfront.net/img/gallery/%s.jpg" % imgNum
page = urllib2.urlopen(url)
open(out,"wb").write(page.read())

Block helper for hbs.

First argument should match the filename of the component (e.g. modal). Anything passed to the component as an attribute will be added to the args object. Content can include any HTML/CSS/JS and even other parials.

Note: Uncomment 'data' in the helper to get access to locals within the component. Otherwise pass any locals to the component as attributes.

@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);

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'
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