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
ACT I, SCENE I | |
[A dark and shadowy room. A lone figure, ALEX, sits at a computer screen, typing frantically. A soft blue glow illuminates their face.] | |
ALEX: | |
[typing] "And now, my honey pot is set, a trap to catch the cyber thief. Their malware will be snared and caught, their infiltration brief." | |
[Enter KIM, a fellow cyber security expert, looking concerned.] | |
KIM: |
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
Prompt: | |
Given this JavaScript code, write a business case, mission statement, and path to profitability: | |
export const log = arg => console.log(arg) | |
Response: | |
Business Case: | |
The logging function in JavaScript is a critical component in software development. It helps developers to debug and monitor their code by providing visibility into how the program is running. The exportable log function is a simple, yet powerful way to log messages to the console in JavaScript. There is a market for this type of utility, and developers are willing to pay for a reliable logging tool. |
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 urllib2 | |
import threading | |
from Queue import Queue | |
import sys, os, re | |
class ThreadedDownload(object): | |
REGEX = { | |
'hostname_strip':re.compile('.*\..*?/', re.I) | |
} |
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
// reference plugin: | |
// https://github.com/remarkjs/remark-gfm/blob/main/index.js | |
// which wraps: | |
// https://github.com/micromark/micromark-extension-gfm-strikethrough/blob/56aef3a974c1b9baee72279e93f9c1fe7205a9af/index.js#L23 | |
const remark = require('remark'); | |
const Compiler = (tree) => { | |
return tree; | |
}; |
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
THREE.Vector3.prototype.lerp = function ( a, t ) { | |
return this.clone().addSelf( a.clone().subSelf( this ).multiplyScalar( t ) ); | |
}; | |
THREE.Vertex.prototype.interpolate = function( other, t ) { | |
var v = new THREE.Vertex( this.position.lerp( other.position, t ) ); | |
v.normal = this.normal.clone(); | |
return v; | |
}; |
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 Propagate from './propagate'; | |
describe('Propagate', () => { | |
describe('value storage & looking', () => { | |
it('stores a single value for lookup', () => { | |
const propagate = new Propagate(); | |
propagate.set('mykey', 'myvalue'); | |
expect(propagate.get('mykey')).toBe('myvalue'); | |
}); |
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 doSomething(config) { | |
var result = {}; | |
if (config.enableA) { | |
... 10 lines of code ... | |
result.A = {}; | |
} | |
if (config.enableB) { | |
... 15 lines of code ... | |
result.B = {}; |
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
// myFunc will be executed asynchronously after the initial promise resolved | |
somePromise.then(myFunc) | |
// event if the originating promise doesn't do anything asynchronously | |
function quickPromise() { | |
// this function returns a promise that immediately resolves with "hello world" | |
return new Promise(resolve => { | |
resolve('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
/* | |
THREE.CSG | |
@author Chandler Prall <chandler.prall@gmail.com> http://chandler.prallfamily.com | |
Wrapper for Evan Wallace's CSG library (https://github.com/evanw/csg.js/) | |
Provides CSG capabilities for Three.js models. | |
Provided under the MIT License | |
*/ |
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": "pkg-a", | |
"version": "1.0.0" | |
} |
NewerOlder