Skip to content

Instantly share code, notes, and snippets.

Narretz / bh_core.sublime-settings
Last active Jun 16, 2019
Sublime Text BracketHighlighter settings for Vue Component
View bh_core.sublime-settings
// Rule definitions for finding and matching brackets.
// Brackets are found by using regex and can use scope
// qualifiers exclude certain matches.
// Once all matches are found, the closest pair surrounding
// the cursor are selected.
"brackets": [
// Basic brackets
"name": "curly",
View angular.js
This file has been truncated, but you can view the full file.
* @license AngularJS v1.6.10-local+sha.41caff7a7
* (c) 2010-2018 Google, Inc.
* License: MIT
(function(window) {'use strict';
/* exported
Narretz /
Created May 23, 2016
Bash script that extracts commits from Github PR and puts them on top of the current branch
set -e
prurl=${1:?"Pull request URL is mandatory"}
curl -kL "$prurl.patch" | git am -3 && git commit --amend -m "$(git show --format=%B HEAD -s)
Closes #${prno}"
Narretz / angular-replace-issues
Last active Aug 29, 2015
Angular issues related to replace: true option
View angular-replace-issues (Causes to unexpected behavior to ng-class inside directive) (Different DOM when using template vs templateUrl with replace true) (Replace True Breaking Pristine Class) (Combining ng-show conditions in a directive with replace = true fails) (Directive with 'replace: true' and template) (Duplicated style attribute in directive with template and replace: true) (syntax error on directive with replace = true) (Directive with ng-class in template fails to merge its attribute with its caller's ng-class attribute) (1.2-rc3 breaks combination of transclude and replace cau
Narretz / gist:c77117a8fc561186db99
Last active Aug 29, 2015
Lumincance HDR notes
View gist:c77117a8fc561186db99
When LHDR needs to use align_image_stack, it needs to be run as admin
However that doesn't work when LHDR is started from Lightroom as editor.
Mantiok 06
Narretz / angular-input
Last active Aug 29, 2015
angular.js input validation / parsing
View angular-input
Currently, processing angular input processing works like this:
$viewValue -> $parsers -> $modelValue -> $validators -> $modelValue -> model on $scope
$viewValue is the value that is displayed to the user in the input
the $viewValue is run through the $parsers pipeline
each parser receives the result of the previous $parser
$parsers can theoretically completely change the $viewValue and the result is the $modelValue
$modelValue is run through the $validators collection
each validator operates on the same $modelValue
Narretz / angdocswin
Last active Dec 15, 2015
How to run the angular.js api docs locally (on Windows 7)
View angdocswin
Tested with angular 1.2.10:
- make sure you use Java 64bit, because 32 bit may have heap size problems
- Follow the build instructions for angular at
- In the angular.js folder, run 'grunt webserver' in your favorite shell
- point your browser to localhost:8000/build/docs
- (if you try to go to the folder from docment root, Windows slashes clash)
- enjoy!
(In other configurations, I had problems with failing GET requests or missing angular.js framework files)