import ([A-Za-z_]+|{ ?([a-zA-Z_]+,? ?)+ ?}) from (\'[a-z-_0-9\.\/-]+\');?
const $1 = require($3)
const ([A-Za-z_]+|\{ ?([a-zA-Z_]+,? ?)+ ?\}) = require\(('[a-z-_0-9\.\/-]+')\);?
| const AWS = require('aws-sdk'); | |
| AWS.config.logger = console; | |
| const dynamodb = new AWS.DynamoDB({ apiVersion: '2012-08-10' }); | |
| let val = 'some value'; | |
| let params = { | |
| TableName: "MyTable", | |
| ExpressionAttributeValues: { |
| color averageColor(PImage image) { | |
| float r = 0; | |
| float g = 0; | |
| float b = 0; | |
| int count = image.pixels.length; | |
| int[] pixels = image.pixels; | |
| for(int i = 0; i < count; i++) { | |
| r += red(pixels[i]); |
| var THREE = require('three') | |
| var SimplexNoise = require('simplex-noise') | |
| document.documentElement.style.width = '100%' | |
| document.documentElement.style.height = '100%' | |
| document.body.style.width = '100%' | |
| document.body.style.height = '100%' | |
| document.body.style.margin = '0' | |
| document.body.style.overflow = 'hidden' | |
| var canvas = document.createElement('canvas') |
| # Author: Zameer Ansari | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # http://wiki.nginx.org/Pitfalls | |
| # http://wiki.nginx.org/QuickStart | |
| # http://wiki.nginx.org/Configuration | |
| # | |
| # Generally, you will want to move this file somewhere, and start with a clean | |
| # file but keep this around for reference. Or just disable in sites-enabled. | |
| # |
| const SimplexNoise = require('simplex-noise'); | |
| const simplex = new SimplexNoise(); | |
| module.exports = curlNoise; | |
| function curlNoise (x, y, z, out = new THREE.Vector3()) { | |
| const eps = 1.0; | |
| let n1, n2, a, b; | |
| n1 = simplex.noise3D(x, y + eps, z); | |
| n2 = simplex.noise3D(x, y - eps, z); |
| #target Illustrator | |
| /* | |
| Revision-1 | |
| Author: Shivendra Agarwal | |
| Year: 2017 | |
| Title: Script to scale-up artwork and artboard above 15 Mpixel | |
| */ | |
| if ( app.documents.length > 0 ) | |
| alert("ERROR: \n Close all documents before running this script." ); |
| import _ from 'underscore'; | |
| export default class TextureAtlas { | |
| constructor(json, image) { | |
| this._textures = {}; | |
| let texture = new THREE.Texture(image); | |
| texture.needsUpdate = true; | |
| let frames = json.frames; | |
| _.keys(frames).forEach(function(key, i) { |
| // Simulates n colored point lights (LEDs) shining at a wall from a distance wd. | |
| // Wall distance; increase for more fuzzy lights, | |
| // decrease for sharper point lights. | |
| float wd = 0.15f; | |
| const int nLights = 4; | |
| const vec3 lights[nLights] = vec3[]( | |
| vec3(1.0f, 0.0f, 0.0f), | |
| vec3(0.0f, 1.0f, 0.0f), |
| version: '3' | |
| services: | |
| traefik: | |
| image: marciopuga/traefik:latest | |
| build: ./traefik/. | |
| command: --web --docker --docker.domain=docker.localhost --docker.watch \ | |
| --logLevel=DEBUG \ | |
| --docker.exposedbydefault=false \ | |
| --entryPoints='Name:http Address::80' \ | |
| --defaultEntryPoints='http' |