This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export NOHGHOOK=true | |
TO="$1" | |
SEMVER_ACTION="$2" | |
FROM="$(hg branch)" | |
echo "promoting $FROM to $TO" | |
if [[ "$TO" == "qa" ]] || [[ "$TO" == "uat" ]] || [[ "$TO" == "default" ]]; then | |
if [[ "$SEMVER_ACTION" == "major" ]] || [[ "$SEMVER_ACTION" == "minor" ]] || [[ "$SEMVER_ACTION" == "patch" ]]; then | |
npm version $SEMVER_ACTION | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requestOnLoad from 'request-on-load'; | |
const {myApiRequest} from '../ApiClient'; | |
| |
class MyComponent extends React.Component { | |
| |
componentWillMount() { | |
this.props.request(() => myApiRequest()); | |
} | |
| |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LCD = require('jsupm_i2clcd'); | |
var myLcd = new LCD.Jhd1313m1 (0, 0x3E, 0x62); | |
var messages = [['Old Mc Donald', 'Had A farm', [18,239,99]], | |
['Eee I Eee I Oh', 'an on that farm he had a ', [18,239,99]], | |
['DUck', 'There a quack everwhere a quack quack', [18,239,99]]]; | |
var pos = 0; | |
setInterval(function() { | |
var message=messages[pos]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import randomString from 'random-string'; | |
import Uuid from 'node-uuid'; | |
import {couchUpdate, couchSave, couchView, couchDesignDoc} from '../helpers/couch'; | |
const TYPE = 'Location'; | |
export const save = (location) => { | |
return couchSave(Uuid.v4(), { | |
type: TYPE, | |
address: location.address, | |
postcode: location.postcode, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function titoTwitterList (hook) { | |
var body = hook.req.body; | |
var twitterAnswer = body.answers.filter(function (a) { | |
return a.question.title === 'Twitter'; | |
})[0]; | |
if (twitterAnswer && twitterAnswer.response) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before transpile | |
couchDesignDoc('User', { | |
email: { | |
map: (doc) => { | |
if(doc.type === 'User') { | |
emit(doc.email, doc); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { NICE, SUPER_NICE } from './colors'; | |
class Counter extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { counter: 0 }; | |
this.interval = setInterval(() => this.tick(), 1000); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
INTEL CORPORATION PROPRIETARY INFORMATION | |
This software is supplied under the terms of a license agreement or nondisclosure | |
agreement with Intel Corporation and may not be copied or disclosed except in | |
accordance with the terms of that agreement | |
@licence Copyright(c) 2014-2015 Intel Corporation. All Rights Reserved. | |
*******************************************************************************/ | |
var intel = intel || {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$('.print-me').on('click', function () { | |
var $areaToPrint = $($(this).data('print-me')); | |
var $hiddenAreas = $('.hide-print'); | |
if ($areaToPrint.length) { | |
$hiddenAreas.hide(); | |
$areaToPrint.show(); | |
window.print(); | |
$hiddenAreas.show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.2) | |
// Compass (v1.0.0.alpha.17) | |
// ---- | |
@import "compass"; | |
$primary-color:red; | |
body{ |