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 DEF_TEMPLATE = `<p><b>Problem:</b></p> | |
<p></p> | |
<p><b>Result:</b></p> | |
<p></p> | |
<p><b>Solution or Comments:</b></p>`; | |
function pasteTemplateTask(event) { | |
const elm = event.target; | |
const editor = elm.closest(".ProseMirror") || elm.querySelector(".ProseMirror"); | |
if (editor && editor.querySelector('[class*="placeholder"]')) { |
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
function transliterateToEmoji(text) { | |
const keys = { | |
а: "a", | |
б: "b", | |
в: "v", | |
г: "g", | |
д: "d", | |
е: "e", | |
ё: "e", | |
ж: "j", |
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 puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Adjustments particular to this page to ensure we hit desktop breakpoint. | |
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
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
[{ | |
"noTickets": "#2196f3", | |
"tickets": "#0960a5", | |
"selected": "#2196f3" | |
}, { | |
"noTickets": "#e91e63", | |
"tickets": "#930e3b", | |
"selected": "#e91e63" | |
}, { | |
"noTickets": "#8bc34a", |
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
/* | |
Generic Canvas Overlay for leaflet, | |
Stanislav Sumbera, April , 2014 | |
- added userDrawFunc that is called when Canvas need to be redrawn | |
- added few useful params fro userDrawFunc callback | |
- fixed resize map bug | |
inspired & portions taken from : https://github.com/Leaflet/Leaflet.heat | |
License: MIT |
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
# https://gist.github.com/835458 | |
head.js( | |
"/javascripts/vendor/plugins/coffeekup.js", | |
"/javascripts/vendor/plugins/jquery.js", | |
"/javascripts/vendor/plugins/underscore.js", | |
"/javascripts/vendor/plugins/backbone.js", | |
"/javascripts/app/deals.js" | |
) | |
html_head = -> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
html { | |
font: 14px Helvetica, sans-serif; | |
background: black; | |
color: white; |
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
define([ | |
'jquery', | |
'underscore', | |
'backbone', | |
'marionette', | |
'handlebars', | |
'text!templates/app_view.html', | |
'modules/mainMenuView/mainMenuView', |
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
function toStringUrl(obj,parent) { | |
"use strict"; | |
var url,el,param,k; | |
parent = parent || ''; | |
url = []; | |
for (k in obj) { | |
el = obj[k]; |
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
/* Original is in LESS and can be found here: https://gist.github.com/gefangenimnetz/3ef3e18364edf105c5af */ | |
@mixin material-shadow($level:1){ | |
@if $level == 1 { | |
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | |
} | |
@else if $level == 2 { | |
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); | |
} |
NewerOlder