This file contains hidden or 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
| Started by user anonymous | |
| Building in workspace /var/lib/jenkins/jobs/staging_development/workspace | |
| Performing Post build task... | |
| Match found for : : True | |
| Logical operation result is TRUE | |
| Running script : /home/wbrent/scripts/jenkins/deploy_staging_development.sh | |
| [workspace] $ /bin/sh -xe /tmp/hudson6604474686417610329.sh | |
| + /home/wbrent/scripts/jenkins/deploy_staging_development.sh | |
| BUNDLER is installing the Ruby gems: bundle install --without test development | |
| Using rake (0.9.2.2) |
This file contains hidden or 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
| def hashfy(array) | |
| array.size > 1 ? {array.shift => hashfy(array)} : array.shift | |
| end | |
| require "minitest/autorun" | |
| describe "#hashfy" do | |
| it "converts an array to a nested hash" do | |
| hashfy([:animal, :dog]).must_equal({animal: :dog}) | |
| hashfy([:animal, :mammal, :dog]).must_equal({animal: {mammal: :dog}}) |
This file contains hidden or 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 Bayes = (function(){ | |
| function constructor(positives, negatives) { | |
| this.positives = positives; | |
| this.negatives = negatives || reverse(positives); | |
| } | |
| function compute(probabilities) { | |
| return probabilities.reduce(function(previous, current){ | |
| return previous * current; | |
| }, 1); |
This file contains hidden or 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
| describe "it creates the correct wrapper object", -> | |
| assertCount ({ | |
| "count": 25, | |
| "key": "e114644", | |
| "length": 25, | |
| "name": "Heavy Rotation Station" | |
| }, 25 ); |
This file contains hidden or 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
| class Tower | |
| def initialize(name, rings) | |
| @name = name | |
| @rings = rings | |
| end | |
| def to_s | |
| @name | |
| end |
This file contains hidden or 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.4.7) | |
| // Compass (v1.0.1) | |
| // ---- | |
| $list: ( | |
| (a: ".div-1", b: (a: 100px)), | |
| (a: ".div-2", b: (a: 200px)), | |
| (a: ".div-3", b: (a: 300px)), | |
| ); |
This file contains hidden or 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 {setEntries, next, vote, INITIAL_STATE} from './core'; | |
| // This is a polymorphic aprorach that conforms to all SOLID principles | |
| // This reduce is much simpler and will raise an error if the action does not exist | |
| export default function reducer(state = INITIAL_STATE, action) { | |
| return action.handler(state, action.payload); | |
| } | |
| // This is the defensive version of the reducer above, if there is an error returns the current state | |
| export default function maybeReducer(state = INITIAL_STATE, action) { |
This file contains hidden or 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
| // **** Framework ******* | |
| function createAction(reducer) { | |
| const subject$ = new Rx.Subject(); | |
| return { | |
| dispatch (payload) { | |
| subject$.onNext(payload); | |
| }, | |
| stream$: subject$.map((payload) => { |
This file contains hidden or 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
| # this command syncs docker-machine running on virtualbox with your current working directory | |
| # replace "/app/user" with the path where your app will be mounted on the docker container | |
| # $(pwd) this will return your local folder and sync it with the equivalen folder on virtualbox | |
| # make sure to stop your docker-machine before running this command | |
| VBoxManage sharedfolder add DFC --automount --name /app/user --hostpath $(pwd) |
This file contains hidden or 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
| $static-font-path: "salesforce-lightning-design-system/assets/fonts/webfonts/"; | |
| // This is needed to fix loadind fonts | |
| // https://github.com/salesforce-ux/design-system/issues/71 | |
| @mixin set-slds-font($name, $file, $weight: 400, $style: normal) { | |
| @font-face { | |
| font-family: $name; | |
| font-weight: $weight; | |
| font-style: $style; | |
| src: font-files( |