Current Status: Still Investigating..
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
// ref. https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle | |
function getStyle(elem, prop) { | |
var styles = window.getComputedStyle(elem, null); | |
var value = styles.getPropertyValue(prop); | |
if (!value) { | |
throw "Could not get style for " + prop; | |
} | |
return 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
function getDocumentPosition(oElement) { | |
var posX=0, posY=0; | |
if(oElement.offsetParent) { | |
for(;oElement; oElement = oElement.offsetParent) { | |
posX += oElement.offsetLeft; | |
posY += oElement.offsetTop; | |
} | |
return {x: posX, y: posY}; | |
} else { | |
return {x: oElement.x, y: oElement.y}; |
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> | |
<link rel="stylesheet" href="style.css"> | |
<script> | |
var previewFile; | |
window.onload = function() { | |
var canvas = document.querySelector("#canvas-to-resize"); |
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
#!/usr/bin/env node --harmony | |
var co = require('co'); | |
var prompt = require('co-prompt'); | |
var program = require('commander'); | |
program | |
.arguments('<file>') | |
.option('-u, --username <username>', 'The user to authenticate as') | |
.option('-p, --password <password>', 'The user\'s password') | |
.action(function(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
{ | |
"name": "nodecmd", | |
"version": "0.0.3", | |
"description": "A command-line tool for creating command line tol", | |
"main": "index.js", | |
"bin": { | |
"snippet": "./index.js" | |
}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" |
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 ng-app="myapp"> | |
<head> | |
<script src="https://maps.googleapis.com/maps/api/js"></script> | |
<script src="http://code.angularjs.org/1.2.25/angular.js"></script> | |
<script src="https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/scripts/ng-map.js"></script> | |
<script> | |
var app = angular.module('myapp', ['ngMap']); | |
app.controller('MyCtrl', function($scope) { | |
$scope.positions = [ [-24,132] ,[-25,131] ,[-26,130] ]; |
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> | |
<body> | |
<script src="//unpkg.com/vue/dist/vue.min.js"></script> | |
<div id="hello-world" v-on:click="msg++"> | |
Hello {{ msg }} | |
</div> | |
<script> | |
new Vue({ | |
el: "#hello-world", |
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> | |
<body> | |
<script src="https://fb.me/react-15.0.0.js"></script> | |
<script src="https://fb.me/react-dom-15.0.0.js"></script> | |
<script src="https://unpkg.com/babel-standalone/babel.min.js"></script> | |
<script type="text/babel"> | |
const style = { | |
backgroundColor: 'grey', | |
fontSize: '24px' |
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
class PlunkerSubmit { | |
constructor() { | |
this.formFields = []; | |
this.indexHeads = []; | |
this.indexBody = ''; | |
} | |
setDescription(description) { | |
this.formFields.push({name: 'description', value: description}); |