So I've read a few articles and watched a few vlogs recently trying to pinpoint why some progressives are going completely nuts recently and why the next generation is turning more and more to libertarianism. One hypothesis I appreciated was the idea that this is the consquence of a generation that abandoned values in favor of postmodernism. A common narrative that I've heard since the George W days was that of the "pressured christian", the kid who had religion "forced" on them when they were young. Especially in the 2000s under George W, the feelings of having religion "forced" on them moved into their political lives, emboldening them to fight back. Ironically, in their frustration I think they've made the very same mistakes of pushing their ideology on others, an
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
| function fizzBuzz(first, second, iterations = 100, output = (value) => console.log(value)) { | |
| first = parseInt(first); | |
| second = parseInt(second); | |
| const third = first * second; | |
| iterations = parseInt(iterations); | |
| if (isNaN(third) || isNaN(iterations) || typeof output !== 'function') { | |
| return console.error('Proper usage: fizzBuzz(first: Number, second: Number, iterations: Number, output: Function)'); | |
| } | |
| for (let i = 1; i <= iterations; i++) { | |
| if (i % third === 0) { |
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
| <template> | |
| <require from="myCustomElement"></require> | |
| <my myevent.delegate="myFunction($event)"></my> | |
| </template> |
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
| <template> | |
| app | |
| <router-view></router-view> | |
| </template> |
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
| export class MyViewModel { | |
| // this is what the @inject(Element) decorator does to the MyViewModel class under the hood. | |
| static inject = [Element]; | |
| constructor(element) { | |
| this.el = element; | |
| } | |
| } |
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 { Container } from 'aurelia-dependency-injection'; | |
| describe('the unit test', () => { | |
| let container; | |
| beforeEach() { | |
| container = new Container(); | |
| // Off the top of my head, I'm not sure how we would create an element in jasmine. I want to say it would look something like this. Since this isn't what you're really interested in, I'm just leaving it like this for now. It's probably wrong. | |
| container.registerInstance(Element, new Element()); | |
| } |
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
| // MyModel is a class that represents a database object. | |
| export class MyModel { | |
| name; | |
| address; | |
| telephone; | |
| constructor(obj) { | |
| this.name = obj.name; | |
| this.address = obj.address; | |
| this.telephone = obj.telephone; |
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
| <template> | |
| <style> | |
| .list { | |
| user-select: none; | |
| } | |
| .list + .list { | |
| margin-top: 1em; | |
| } | |
| .list-item { | |
| border: 1px solid; |
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
| <template> | |
| <div> | |
| date is ${date} | |
| </div> | |
| <div> | |
| myClass.date is ${myClass.date} | |
| </div> | |
| <div> | |
| Object.is(date, myClass.date) is ${is(date, myClass.date)} | |
| </div> |
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
| <div class="screenshots"> | |
| <button class="prev"> | |
| <i class="fa fa-chevron-left"></i> | |
| </button> | |
| <div class="monitor"> | |
| <img src="/images/monitor.png"> | |
| </div> | |
| <div class="images"> | |
| <a href="/images/portfolio/2016-1-30-oshab/1.jpg" target="_blank" style="margin-left: -201.9%;"> | |
| <img src="/images/portfolio/2016-1-30-oshab/1.jpg"> |