This file contains hidden or 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
| app.directive('selectOnClick', function () { | |
| return { | |
| restrict: 'A', | |
| link: function (scope, element, attrs) { | |
| element.on('click', function () { | |
| this.select(); | |
| }); | |
| } | |
| }; | |
| }); |
This file contains hidden or 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
| /** | |
| * Author: William Gallios <[email protected]> | |
| * | |
| * License: MIT | |
| * | |
| * @param msg - Alert Message | |
| * @param type (optional) - warning|success|danger|info | |
| * @param header (optional) - header of alert | |
| * | |
| * Usage: alertsManager.addAlert('You're doing a great yob!', 'success', 'Wow!'); |
This file contains hidden or 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
| // MIT License | |
| // Copyright Peter Širka <[email protected]> | |
| // Version 1.02 | |
| var events = require('events'); | |
| var SUGAR = 'AtH101s84'; | |
| var USERAGENT = 20; | |
| // expireCookie in days | |
| // expireSession in minutes |
This file contains hidden or 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
| /** | |
| * A generic confirmation for risky actions. | |
| * Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function | |
| */ | |
| angular.module('app').directive('ngReallyClick', [function() { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| element.bind('click', function() { | |
| var message = attrs.ngReallyMessage; |
This file contains hidden or 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
| # changes "ls" functionality to include flags "ls -AlFh" | |
| if [ "$TERM" != "dumb" ]; then | |
| eval `dircolors -b` | |
| export LS_OPTIONS='-AlFh --color=always' | |
| alias ls='ls $LS_OPTIONS' | |
| fi | |
| alias lsd='ls -AlFh --color | grep ^drw' | |
| alias lsnd='ls -AlFh --color | grep -v ^drw' | |
| alias cleanvim='find . -name "*.swp" -type f -delete' |
This file contains hidden or 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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder