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 resetTime(date) { | |
date.setHours(0, 0, 0, 0); | |
return date; | |
} | |
function isMinimumAge(date, minimumAge) { | |
const inputDate = resetTime(new Date(date.getTime())) | |
const minimumDate = resetTime(new Date()); | |
minimumDate.setFullYear(minimumDate.getFullYear() - minimumAge); | |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
currentYear: 2016, | |
game: { | |
title: `Tom Clancy's Rainbow Six: Siege`, | |
}, | |
user: { | |
name: 'Lam' | |
}, |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
currentYear: 2016, | |
game: { | |
title: `Tom Clancy's Rainbow Six: Siege`, | |
}, | |
video: { | |
channelName: 'lolRenaynay', | |
thumbnails: [ |
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 Component from 'ember-component'; | |
import { assert } from 'ember-metal/utils'; | |
const DEFAULT_CLASS_NAME = 'simple-checkbox'; | |
const AVAILABLE_POSITIONS = ['top', 'middle']; | |
export default Component.extend({ | |
classNames: `${DEFAULT_CLASS_NAME}`, | |
classNameBindings: [`disabled:${DEFAULT_CLASS_NAME}--disabled`], |
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
// remove modal | |
$(".tp-modal").remove(); | |
$(".tp-backdrop").remove(); | |
// allow scrolling | |
$("body").removeClass("tp-modal-open"); |
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 Ember from "ember"; | |
export default Ember.Component.extend({ | |
classNames: ["etch-field", "float-label__container"], | |
tagName: "label", | |
content: null, | |
inputClassName: null, | |
options: { | |
minimumResultsForSearch: -Infinity |
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 Ember from "ember"; | |
import { | |
module, | |
test, | |
} from "qunit"; | |
module("async-safe-patch"); | |
function testSetter(type) { | |
test(`${type}: set`, assert => { |
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 input = [ | |
[1, 2, 3], | |
[4, 5, 6], | |
[7, 8, 9] | |
]; | |
var output = [ | |
[1], | |
[4, 2], | |
[7, 5, 3], |
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
#!/usr/bin/env bash | |
script_name="${0##*/}" | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: $script_name width height refresh" | |
exit 1 | |
fi | |
width=$1 | |
height=$2 |