This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tabWidth": 2, | |
"useTabs": false, | |
"singleQuote": false, | |
"importOrder": ["^[@]?[a-zA-Z]", "^[@/a-zA-Z]", "^../", "^./"], | |
"importOrderSeparation": true, | |
"importOrderSortSpecifiers": true, | |
"plugins": ["@trivago/prettier-plugin-sort-imports"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class TypeExtensions | |
{ | |
/// <summary> | |
/// Determine whether a type is simple (String, Decimal, DateTime, etc) | |
/// or complex (i.e. custom class with public properties and methods). | |
/// </summary> | |
/// <see cref="http://stackoverflow.com/questions/2442534/how-to-test-if-type-is-primitive"/> | |
public static bool IsSimpleType( | |
this Type type) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Jonathan Conway | |
email = jonathan.conway@gmail.com | |
[alias] | |
bn = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD` | |
br = branch | |
c = commit | |
co = checkout | |
com = checkout master | |
cp = cherry-pick $0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Inspired by solution by StackOverflow user #18664. | |
# [See: https://apple.stackexchange.com/a/211219/97498] | |
# | |
# Usage: | |
# gif [filename] | |
# | |
# filename - name of a .mov file to convert, excluding .mov extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias subl='open -a "Sublime Text"' | |
alias l="ls -la" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reload (or initialize) addThis social share buttons. | |
// IMPORTANT: make sure you put in a correct pubid on line 7. | |
window.addthis_reload = function () { | |
if (!window.addthis) { | |
// Load addThis, if it hasn't already been loaded. | |
window['addthis_config'] = { 'data_track_addressbar' : false }; | |
$('body').append('<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={YOUR PUBID HERE}"></script>'); | |
} else { | |
// Already loaded? Then re-attach it to the newly rendered set of social icons. | |
// And reset share url/title, so they don't carry-over from the previous page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker rm --force $(docker ps --all -q) | |
docker rmi --force $(docker images --all -q) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Enum which supports attached methods. | |
* Each method's `this` is the enum object. | |
*/ | |
class Enum { | |
/** | |
* @param items {Object} Enum keys and values as a plain object | |
* @param methods {Object} Enum methods as a plain object | |
* (names are keys, values are methods) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.preBind = function(type, data, fn) { | |
var currentBindings = this.data('events')[type]; | |
var currentBindingsLastIndex = currentBindings.length - 1; | |
var newBindings = []; | |
// bind the event | |
this.bind(type, data, fn); | |
// move the new event to the top of the array | |
newBindings.push(currentBindings[currentBindingsLastIndex]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ngdoc directive | |
* @name radioTabbable | |
* @requires none | |
* @description | |
* Makes individual radio buttons focuseable using the TAB key. | |
* (By default, pressing TAB while on a radio button would have shifted focus to the next control outside of the radio group.) | |
* @usage | |
* <input type="radio" name="radioGroup" value="0" radio-tabbable="" /> | |
* <input type="radio" name="radioGroup" value="1" radio-tabbable="" /> |
NewerOlder