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
console.clear(); | |
/** | |
* Video: "JavaScript Array superpowers: Map, Filter, Reduce" | |
* URL: https://www.youtube.com/watch?v=qTeeVd8hOFY | |
* | |
* These 2 exercises test your knowledge and use of the map method. | |
* Remember, mapping creates a new array from an existing array with | |
* a 1 to 1 relationship in length. | |
* | |
* Map :: [a,a,a] -> [b,b,b] |
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
"use strict"; | |
var presentationLogger = (function(window, undefined) { | |
// warn -> Message -> Warning | |
var warn = function _warning (val) { | |
console.warn( `%c${val}`, 'color:#ff3c41;font-weight:bold' ); | |
}; | |
// echo :: Message -> Echo message to console italized. | |
var echo = function _logging (val) { |
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 Ember from 'ember'; | |
import '../prism'; | |
import getSetDecorator from '../ember-getsetter'; | |
import exampleSlides from '../example-slides'; | |
let {get, set} = getSetDecorator(); | |
let examples = []; | |
exampleSlides.forEach(function(item) { | |
examples.push(item); | |
}); |
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
/** | |
* Ember | |
* (more functional style) Getter and Setter | |
* | |
* setup option 1 (modular): | |
* const {get, set} = getSetterDecorator(); | |
* setup option 2 (global): | |
* getSetterDecorator( window ); | |
*/ | |
import Ember from 'ember'; |
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 Ember from "ember"; | |
export default Ember.Helper.helper(function([content, group, contentGroupKey]) { | |
return content.filterBy(contentGroupKey, group); | |
}); |
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 is from './is-util'; | |
/** | |
* Either Monad class (from Functional Programming in JavaScript) | |
*/ | |
class Either { | |
constructor(value) { | |
this._value = value; | |
} | |
get value () { |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
isDisabled: false, | |
pureBoolean: Em.computed('isDisabled', function() { | |
return !this.get('isDisabled'); | |
}), | |
actions: { | |
makeDisabled() { |
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 Em from 'ember'; | |
const birthdayRE = /\d{4}-\d{2}-\d{2}/; | |
export default Em.Component.extend({ | |
classNames: ['col-md-12', 'section-post-comment'], | |
title: 'Sign-up', | |
/** |
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
<?php | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
require '../vendor/autoload.php'; | |
define("OAUTH_ACCESS_TOKEN", "the oauth here ya know"); | |
define("OAUTH_ACCESS_TOKEN_SECRET", "put the secret here"); | |
define("CONSUMER_KEY", "key key key key key key"); |
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
"""Created by Michael Rosata | |
Python 2.7 | |
Merge together .csv files. I'm creating this because I have 30 .csv files which need to be concatenated. | |
I also have many files which need to be split, so I've added splitting functionality to this as well. | |
""" | |
import csv | |
import sys | |