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
window.onload = () => {graph()}; | |
function graph(){ | |
const canvas = document.querySelector('#canvas'); | |
let ctx = canvas.getContext('2d'); | |
ctx.lineWidth = 0.5; | |
const minX = 20; | |
const minY = 10; | |
const arrowWidth = 3; | |
const arrowLength = 5; |
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 path = require('path'); | |
module.exports = { | |
entry: ["./js/module.js"], | |
mode: 'development', | |
output: { | |
path: path.resolve(__dirname + './../../public/dist'), | |
filename: 'bundle.js' | |
}, | |
module: { | |
rules: [ |
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
#! /bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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 http = require('http') | |
const port = 3000 | |
const requestHandler = (request, response) => { | |
console.log(request.url) | |
response.end('Hello Node.js Server!') | |
} | |
const server = http.createServer(requestHandler) | |
server.listen(port, (err) => { | |
if (err) { | |
return console.log('something bad happened', err) |
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
if (status === 'success') { | |
//page.render("just loaded.jpg"); | |
setTimeout(function(){ | |
page.render("screenshots/web.jpg"); | |
var num = evaluate(tag); | |
console.log(num); | |
phantom.exit(); | |
}, 2500); | |
} | |
else { |
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 { Renderer2, Inject } from '@angular/core'; | |
import { DOCUMENT } from '@angular/platform-browser'; | |
export class AngularComponent{ | |
constructor(private _renderer2: Renderer2, @Inject(DOCUMENT) private _document) { | |
} | |
ngOnInit(){ | |
let s = this._renderer2.createElement('script'); | |
s.type = `text/javascript`; | |
s.text = 'document.addEventListener("DOMContentLoaded", ()=>{\n' + |
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
"styles": [ | |
"src/styles.css", | |
"./node_modules/materialize-css/dist/css/materialize.css" | |
], | |
"scripts": [ | |
"./node_modules/jquery/dist/jquery.js", | |
"./node_modules/hammerjs/hammer.js", | |
"./node_modules/materialize-css/dist/js/materialize.js" | |
] |
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
//Lambda Function Code | |
exports.handler = (event, context, callback)=>{ | |
callback(null, JSON.stringify(event.result)); | |
}; |
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="import" href="http://some.domain/patch.html"> | |
</head> | |
<body> | |
<script src = "http://some.domain/js/main.js"></script> | |
</body> | |
</html> |
NewerOlder