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
// let svg = document.querySelector('svg'); | |
function svgToPng(svg) { | |
let svgData = new XMLSerializer().serializeToString(svg); | |
let canvas = document.createElement('canvas'); | |
let ctx = canvas.getContext('2d'); | |
let DOMURL = window.URL || window.webkitURL || window; | |
let img = new Image(); | |
let blog = new Blob([svgData], {type: 'image/svg+xml'}); | |
let url = DOMURL.createObjectURL(blog); |
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 java.io.{File, PrintWriter} | |
import org.jsoup.Jsoup | |
import org.jsoup.nodes.Element | |
import collection.JavaConversions._ | |
/** | |
* Created by josh on 3/20/15. | |
* | |
* Extracts data from http://www.nuforc.org and writes it to a .CSV file |
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'; | |
angular.module('myApp') | |
.directive('colorpicker', function () { | |
return { | |
templateUrl: 'app/colorpicker/colorpicker.html', // Replace with your path | |
restrict: 'EA', | |
require: 'ngModel', | |
scope: { | |
colors: '=?', |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 GoogleAPILoader = (function() { | |
"use strict"; | |
function GoogleAPILoader(config) { | |
this.clientId = config.clientId; | |
this.apiKey = config.apiKey; | |
this.scopes = config.scopes; | |
this.clientLibraries = config.clientLibraries || []; | |
} |