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 headings = ['h1','h2','h3', 'h4', 'h5','h6']; | |
function onlyUnique(value, index, self) { | |
return self.indexOf(value) === index; | |
} | |
headings.map(heading => { | |
return { | |
[heading]: [...document.querySelectorAll(heading)].map(item => window.getComputedStyle(item).fontSize).filter(onlyUnique) | |
}; |
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, { useRef } from 'react'; | |
import Slider from './Slider'; | |
import useSlider from './useSlider'; | |
const MIN_VALUE = 0; | |
const MAX_VALUE = 500; | |
function PriceSlider() { | |
const sliderRef = useRef(null); |
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
{ | |
"count": 10785236, | |
"photos": [{ | |
"photo_id": 555, | |
"photo_title": "222 Atardecer en Embalse", | |
"photo_url": "http://www.panoramio.com/photo/27932", | |
"photo_file_url": "http://mw2.google.com/mw-panoramio/photos/medium/27932.jpg", | |
"longitude": -64.404945, | |
"latitude": -32.202924, | |
"width": 500, |
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
const { google } = require("googleapis"); | |
const publisher = google.androidpublisher("v2"); | |
const OAuth2 = google.auth.OAuth2(); | |
const SERVICE_ACCOUNT_EMAIL = "[email protected]"; | |
const SERVICE_ACCOUNT_KEY_FILE = require("./path/to/credentials.json"); | |
const jwtClient = new google.auth.JWT( | |
SERVICE_ACCOUNT_KEY_FILE.client_email, |
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'; | |
const webpack = require('webpack'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const path = require('path'); | |
const resolve = path.resolve; | |
const rootDir = resolve(__dirname); | |
const dist = resolve(rootDir, 'appname/secured_assets'); | |
const assetIndex = resolve(rootDir, 'src/app'); |
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
//npm install --save-dev grunt-babel babel-preset-es2015 | |
'use strict'; | |
module.exports = { | |
options: { | |
sourceMap: true, | |
presets: ['es2015'] | |
}, | |
dist: { | |
files: [{ |
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
//To use this: <div tfinder-map="{queryLimit: 3}"></div> | |
angular.module('myApp.directives', []). | |
directive('tfinderMap', function($timeout) { | |
return { | |
restrict: 'A', | |
link: function(scope, element, attrs) { | |
attrs.$observe("tfinderMap", function(value) { | |
if (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
//To check for null int (if int is marked as nullable) | |
if (request.Tickets.Any(x => x.EventId == default(int?))) {} | |
//Otherwise to just check for "no" eventId which is zero | |
if (request.Tickets.Any(x => x.EventId == 0)) {} |
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
// Mobile First | |
@media screen and (min-width: 321px) { // iPhone landscape | |
} | |
@media screen and (min-width: 481px) { // iPad portrait | |
} |
NewerOlder