Skip to content

Instantly share code, notes, and snippets.

🏗
Developing...

Dr. Safi myuseringithub

🏗
Developing...
Block or report user

Report or block myuseringithub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@myuseringithub
myuseringithub / nodeInclude
Created Feb 25, 2019
Execute file code as if written locally.
View nodeInclude
const include = (file) => { eval(filesystem.readFileSync(file) + '') }
View How_Require_Extensions_Work.md

Why

Doing require extensions correctly is essential, because:

  1. Users should be able to install multiple extensions in succession, and have them work together.
  2. Coverage tools like nyc need it to reliably supply coverage information that takes into account sourcemaps from upstream transforms.
  3. Because non-standard, un-predictable behavior causes hard to solve bugs, and major headaches for project maintainers.

What is a require extension anyways?

View extendsFunctionConstructor
// https://www.accelebrate.com/blog/javascript-es6-classes-and-prototype-inheritance-part-1-of-2/
// the extends function is not already defined within the current
// context; therefore, define it
export function extendClass({ childClass, parentClass }) {
// mixin pattern for copying parent constructor function properties
// as static properties to the child constructor function
// properties on constructor function are commonly known as static
// properties
for (var parentPropertyName in parentClass) {
View Temporary list
https://www.accelebrate.com/blog/javascript-es6-classes-and-prototype-inheritance-part-1-of-2/
https://hacks.mozilla.org/2015/08/es6-in-depth-subclassing/
https://medium.com/ecmascript-2015/es6-classes-and-inheritance-607804080906
View Patterns
// Check if defined and value;
const compiledToES5 = !!(optimizeOptions.js && optimizeOptions.js.compile);
View Delete all pipeline build history
# Delete all build history of specific job pipeline.
# http://codeketchup.blogspot.co.il/2016/05/how-to-clean-and-reset-jenkins-build.html
def jobName = "education-webapp"
def job = Jenkins.instance.getItem(jobName)
job.getBuilds().each { it.delete() }
job.nextBuildNumber = 1
job.save()
View Nodejs
# Node.js
# versions
node -v
node -p 'process.versions.v8'
# Install nodejs
# Using Debian, as root
sudo curl -sL https://deb.nodesource.com/setup_5.x | bash -
sudo apt-get update
View Firebase Backups
https://intense-heat-1283.firebaseio.com/.json?format=export&auth=6f1iIOoYc5pFnZ0vgly5DYYwWWX3BZ5a1KDSCBFK
You can’t perform that action at this time.