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
angular.module('myModule').run(function ($rootScope, $state) { | |
/* ENTRY EVENTS */ | |
$rootScope.$on('$locationChangeStart', function (event, toUrl, fromUrl, toHistoryState, fromHistoryState) { | |
console.groupCollapsed('$locationChangeStart'); | |
console.debug('event:', event); | |
console.debug('toUrl:', toUrl); | |
console.debug('fromUrl:', fromUrl); | |
console.debug('toHistoryState:', toHistoryState); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<toolSet name="Yeoman[ng]"> | |
<tool name="Create Route" description="Generates a controller and view, and configures a route in app/scripts/app.js connecting them." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:route $Prompt$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Controller" description="Generates a controller in app/scripts/controllers." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> |
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 | |
### BEGIN INIT INFO | |
# Provides: rtorrent | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start rtorrent as a daemon | |
### END INIT INFO |
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 | |
# make sure the file exists and that it's a regular file before proceeding | |
[ -z "$1" ] && echo "you must specify a file!" >&2 && exit 1 | |
[ ! -e "$1" ] && echo "$1 doesn't exist!" >&2 && exit 1 | |
[ ! -f "$1" ] && echo "$1 is not a regular file!" >&2 && exit 1 | |
FILE=$1 | |
FILE_MIME=$(file -b --mime-type "$FILE") #or "xdg-mime query filetype" | |
VALID_MIMETYPES=( | |
"application/octet-stream" #bmp image |
NewerOlder