Skip to content

Instantly share code, notes, and snippets.

@nikita-graf
nikita-graf / simple-angularjs-controller-inheritance.js
Last active August 29, 2015 14:26
Simple AngularJS controller inheritance
var originalModule = angular.module;
angular.module = function (name, modules) {
var mod = originalModule.apply(angular, arguments);
var injector = angular.injector(modules ? ['ng'].concat(modules) : ['ng']);
mod.inheritController = function (name, Parent, Child) {
function Inherit($controller, $scope) {
var method;
var ctrl = $controller(Parent, {
@nikita-graf
nikita-graf / decode-electron-crash-reporter-dump.md
Last active September 6, 2023 10:33
How to decode Electron crash dump

Here are steps to decode Electron crashReporter dump on macOS:

  1. Download and install breakpad
  2. Download *-symbols.zip for your Electron release
  3. Setup a simple express app:
const app = require('express')();
const path = require('path');
const fs = require('fs');
const multer = require('multer');
function fetchDb(cancel) {
return new Promise(function(resolve, reject) {
if (cancel) {
setTimeout(function() {
reject();
console.log('fetchDb cancel');
}, 500);
} else {
setTimeout(function() {
resolve();
@nikita-graf
nikita-graf / .eleventy.js
Created January 30, 2021 23:09
Fix Eleventy not listening to file changes on WSL
module.exports = function(eleventyConfig) {
return {
chokidarConfig: {
usePolling: true,
},
};
}