Skip to content

Instantly share code, notes, and snippets.

View ChathuraGH's full-sized avatar
☺️
coding

Chathura ChathuraGH

☺️
coding
View GitHub Profile
@ChathuraGH
ChathuraGH / proposal.md
Created March 18, 2025 14:21 — forked from DevilsAutumn/proposal.md
"Allow moving a model between apps" -- proposal for Google Summer of Code 2023.

"Allow moving a model between apps" proposal for Google Summer of Code 2023.

Table of content

  1. Abstract
    • 1.1 Overview
    • 1.2 Goals
    • 1.3 Benefits
  2. The solution
  • 2.1 Modified CreateModel operation .
@ChathuraGH
ChathuraGH / pandoc.css
Created April 1, 2025 13:26 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}

npm version cheatsheet

npm uses Semantic Versioning

npm uses Semantic Versioning. Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.
@ChathuraGH
ChathuraGH / bundle.js
Created April 25, 2025 19:17 — forked from jackgill/bundle.js
A node.js script to create a bundle containing an npm package, and all of its dependencies.
/*
* This script will download a package (and all of its dependencies) from the
* online NPM registry, then create a gzip'd tarball containing that package
* and all of its dependencies. This archive can then be copied to a machine
* without internet access and installed using npm.
*
* The idea is pretty simple:
* - npm install [package]
* - rewrite [package]/package.json to copy dependencies to bundleDependencies
* - npm pack [package]
(function(videojs) {
const defaults = {
bookmarks: []
};
const BookmarkPlugin = function(options) {
const player = this;
const settings = videojs.mergeOptions(defaults, options);
player.bookmarks = settings.bookmarks;
rollup v2.79.2
bundles src/plugin.js → dist/videojs-bookmarks.js...
[!] (plugin babel) BrowserslistError: [BABEL] E:\AI-genearated\Completed\bookmark-publish\v2\src\plugin.js: Unknown version 64 of op_mob (While processing: "E:\\AI-genearated\\Completed\\bookmark-publish\\v2\\node_modules\\@babel\\preset-env\\lib\\index.js")
src/plugin.js
BrowserslistError: [BABEL] E:\AI-genearated\Completed\bookmark-publish\v2\src\plugin.js: Unknown version 64 of op_mob (While processing: "E:\\AI-genearated\\Completed\\bookmark-publish\\v2\\node_modules\\@babel\\preset-env\\lib\\index.js")
at Function.select (E:\AI-genearated\Completed\bookmark-publish\v2\node_modules\browserslist\index.js:1153:17)