Giter VIP home page Giter VIP logo

utilities's Introduction

Hello, I'm Danny! ๐Ÿ‘‹๐Ÿป I am a linguist. ๐Ÿ—ฃ

I work with the Chitimacha Tribe of Louisiana to help them revitalize their once-dormant language. We are using archival materials to produce a modern dictionary and grammar of the language.

I also run the Digital Linguistics (DLx) project, which provides data formats and web-based tools for working with linguistic data. Check out the DLx developers page or the DLx organization on GitHub.

I am a member of the Algonquian Components Project, a National Science Foundationโ€“funded database of morphological components in Algonquian languages, which uses the Digital Linguistics infrastructure.

dwhieb's github stats Top Languages

Digital Linguistics (DLx) Blog

๐ŸŒ Find Me Online! ๐Ÿ’ป Digital Linguistics (DLx)
๐Ÿ”— my website ๐Ÿ”— website
๐Ÿ’ฌ Twitter ๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป developers
๐Ÿ“š ResearchGate GitHub
๐ŸŽ“ Academia.edu ๐Ÿ“ blog
๐Ÿ‘จ๐Ÿผโ€๐Ÿซ Google Scholar ๐Ÿ’ฌ Twitter
๐Ÿ‘” LinkedIn
0000-0002-1411-3773

utilities's People

Contributors

dependabot[bot] avatar dwhieb avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mjurincic

utilities's Issues

checklists

html2element

Add your html2element utility (from the Lotus app).

create /resources folder

This should include lists of resources for math and various programming languages.

Collect all your resource lists from various places.

add license

Use an MIT license, but specify the source and license for Stefan's R diagrams.

checklist for Express apps on Azure

Checklist Items for Express Apps on Azure

package.json

  • The "main" field should point to the entry point for the app (usually app.js)

  • Node engines should be specified in the "engines" field

app.js settings

  • do init and config in separate files, e.g.:

    • authenticate.js
    • config.js
    • errors.js
    • handlebars.js
    • limiter.js
    • logger.js
    • mendeley.js
    • passport.js
    • router.js
    • server.js
    • socket.js
  • trust proxy

    app.enable(`trust proxy`);
  • declare Handlebars engine and file extension

    app.engine(extname, handlebars.engine);
  • log server information when app starts

    • Server started. Press Ctrl+C to terminate.
    • Project
    • Port
    • Time
    • Node Version
    • Env

Middleware

  • authentication (if needed)

  • helmet - security

  • rate limiting (e.g. with express-rate-limit)

  • routing for static files

    express.static(path.join(__dirname, `/public`));

Logging & Error Handling

  • 404 and 500 handlers (should come last in the waterfall)

    // 404 handler
    const error404 = (req, res, next) => {
      // render error page with 404 status
    };
    
    // 500 handler
    const error500 = (err, req, res, next) => {
      // render error page with 500 status and error ID
      // log and report errors
    };
  • generic error handler for server

    server.on(`error`, err => {
      // log and report error
    });
  • standardized error handling

    • standardized messages (e.g. with Boom)
    • res.error middleware
    • convert errors from third-party services (be thorough)
  • provide an option to log requested URL with an environment variable

    • The log should happen after static files are sent
  • provide an option to log server errors with an environment variable

Checklist: load non-critical stylesheets asynchronously

Use rel=preload

<link rel="preload" href="mystyles.css" as="style" onload="this.rel='stylesheet'">

Much like other attribute-toggling approaches above, rel="preload" will cause supporting browsers to downloadโ€“but not applyโ€“the referenced file, so again we need an onload handler to set the rel attribute to stylesheet once it finishes loading. This may not look like a big improvement over other approaches, but one advantage that rel="preload" brings is that supporting browsers will start downloading the file earlier than they would with say, a stylesheet with a non-matching media value.

Can you also just use the async attribute?

restructure repository

  • Put each utility in a separate file
  • Use JavaScript ES6 modules to export each utility to a main index.js file
  • Include index.js in your projects, and import just the utilities you need

write general LESS converter for folders

Should accept any folder as input, and a path as output, and convert all the LESS files in the given folder (and only the LESS files). Should work as both a module and from the command line.

add getClassOf method

Example 6-4. A classOf() function
function classOf(o) {
if (o === null) return "Null";
if (o === undefined) return "Undefined";
return Object.prototype.toString.call(o).slice(8,-1);
}

publish scripts as packages

For each script:

  • check for an already-published version
  • delete the script from this repo if a published version exists
  • create a new repo for the script if no suitable published version exists
    • make repo private if appropriate
  • publish the script from the new repo to npm and gpr

The end result should be that this repo no longer contains any JavaScript scripts.

add `compare` method

const compare = (a, b) => {
  if (a < b) return -1;
  if (a > b) return +1;
  return 0;
};

add Handlebars helpers

Other helpers that are available in handlebars-helpers shouldn't be added here.

function head(name, opts) {
  if (!this.head) this.head = {};
  this.head[name] = opts.fn(this);
  return null;
}

function md(text, inline) {
  // eslint-disable-next-line new-cap
  if (!text) return ``;
  const method = inline === `inline` ? `renderInline` : `render`;
  return new handlebars.SafeString(markdown[method](text));
}

function section(name, opts) {
  if (!this.sections) this.sections = {};
  this.sections[name] = opts.fn(this);
  return null;
}

checklist items

  • prefer Handlebars commenting for HTML (when appropriate)
  • update inline code commenting after writing code
  • all the items from the DLx MAINTAINERS checklist (add these to a general maintenance process checklist)

add isDateString method

const isDateString = dateString => Boolean(Date.parse(dateString));

Check whether a date string is valid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.