Skip to content

Instantly share code, notes, and snippets.

View JaKXz's full-sized avatar

Jason Kurian JaKXz

View GitHub Profile
diff --git a/node_modules/mdx-mermaid/lib/mdxast-mermaid.cjs b/node_modules/mdx-mermaid/lib/mdxast-mermaid.cjs
index f7f8c27..ab57d4e 100644
--- a/node_modules/mdx-mermaid/lib/mdxast-mermaid.cjs
+++ b/node_modules/mdx-mermaid/lib/mdxast-mermaid.cjs
@@ -53,6 +53,7 @@ const createMermaidNode = (node, hName, config) => {
data: {
hName,
hProperties: {
+ class: 'mermaid',
config: JSON.stringify(config),
@JaKXz
JaKXz / Code.gs
Created June 14, 2017 07:35
Google Docs script to find the last active-ish row in a table
function onOpen() {
// get the proparties we need to work with
var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
var tables = body.getTables();
// find the last table [since there's more than one somehow]
var table = tables[tables.length - 1];
var rows = table.getNumRows();
@JaKXz
JaKXz / transpiled.js
Created February 7, 2017 21:29
argsert transpiled by babel 6.22
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
module.exports = function argsert(typeConfig) {
var _this = this;
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@JaKXz
JaKXz / package.json
Last active July 26, 2016 04:06
nyc@7.1.0 working demo
{
"name": "nyc-ava-test",
"version": "1.0.0",
"main": "say.js",
"scripts": {
"test": "cross-env NODE_ENV=test nyc ava"
},
"license": "ISC",
"babel": {
"presets": [
@JaKXz
JaKXz / package.json
Last active June 28, 2016 06:54
nyc@7.0.0-alpha3 lcov report broken
{
"name": "nyc-ava-test",
"version": "1.0.0",
"description": "",
"main": "say.js",
"scripts": {
"test": "nyc -r lcov ava"
},
"author": "",
"license": "ISC",
@JaKXz
JaKXz / nyc@7.0.0-alpha3.txt
Created June 27, 2016 06:42
lcov reporting errors with nyc@7.0.0-alpha3 in a ES2015+ babel project with ava
> NODE_ENV=test nyc -r lcov -r text-summary -i babel-register ava
4 passed
/Users/Jason/git/spomodoro/node_modules/nyc/node_modules/istanbul-reports/lib/lcovonly/index.js:32
writer.println('FN:' + [meta.decl.start.line, meta.name].join(','));
^
TypeError: Cannot read property 'start' of undefined
at /Users/Jason/git/spomodoro/node_modules/nyc/node_modules/istanbul-reports/lib/lcovonly/index.js:32:42
{
"name": "nyc-ava-test",
"version": "1.0.0",
"description": "",
"main": "say.js",
"scripts": {
"test": "npm run test:node-tap && npm run test:ava && npm run test:node-tap:coverage && npm run test:ava:coverage",
"test:node-tap": "tap test-node-tap.js",
"test:ava": "ava test-ava.js",
"test:node-tap:coverage": "tap test-node-tap.js --coverage-report=text",

Keybase proof

I hereby claim:

  • I am jakxz on github.
  • I am jakxz (https://keybase.io/jakxz) on keybase.
  • I have a public key whose fingerprint is E3BD B16B 129C C3F1 C3AC F435 FBFE E3A0 2A3A D2D6

To claim this, I am signing this object:

@JaKXz
JaKXz / package.json
Last active January 2, 2016 20:18
AVA TAP output counting asserts incorrectly
{
"name": "ava-TAP-counting-asserts",
"version": "1.0.0",
"description": "",
"main": "test.js",
"scripts": {
"test": "ava --tap | tap-out | tee tap-out.txt"
},
"author": "",
"license": "MIT",
angular.module('myApp.directives.mySlickCarousel', [])
.controller('CarouselController', function () {
// stuff
})
.directive('priorityNotifications', function () {
return {
restrict: 'E',
templateUrl: 'template.html',
replace: true,
controller: 'CarouselController as carouselCtrl',