Skip to content

Instantly share code, notes, and snippets.

@Narretz
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. http://angularjs.org
* License: MIT
*/
(function(window) {'use strict';
/* exported
minErrConfig,
@Narretz
Narretz / ghpr.sh
Created May 23, 2016
Bash script that extracts commits from Github PR and puts them on top of the current branch
View ghpr.sh
#!/bin/bash
set -e
prurl=${1:?"Pull request URL is mandatory"}
prno=${prurl##*/}
curl -kL "$prurl.patch" | git am -3 && git commit --amend -m "$(git show --format=%B HEAD -s)
Closes #${prno}"
@Narretz
Narretz / angular-replace-issues
Last active Aug 29, 2015
Angular issues related to replace: true option
View angular-replace-issues
https://github.com/angular/angular.js/issues/10811 (Causes to unexpected behavior to ng-class inside directive)
https://github.com/angular/angular.js/issues/10612 (Different DOM when using template vs templateUrl with replace true)
https://github.com/angular/angular.js/issues/10465 (Replace True Breaking Pristine Class)
https://github.com/angular/angular.js/issues/10323 (Combining ng-show conditions in a directive with replace = true fails)
https://github.com/angular/angular.js/issues/8159 (Directive with 'replace: true' and template)
https://github.com/angular/angular.js/issues/6239 (Duplicated style attribute in directive with template and replace: true)
https://github.com/angular/angular.js/issues/6979 (syntax error on directive with replace = true)
https://github.com/angular/angular.js/issues/5695 (Directive with ng-class in template fails to merge its attribute with its caller's ng-class attribute)
https://github.com/angular/angular.js/issues/4837 (1.2-rc3 breaks combination of transclude and replace cau
@Narretz
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.
Operators
==========
Mantiok 06
----------
@Narretz
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
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 http://docs.angularjs.org/misc/contribute
- 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)