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
#!/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 |
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
<?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
# Maintainer: Leonidas Arvanitis <l.arvanitis gmail com> | |
# Contributor: Marius Nestor <marius softpedia com> | |
pkgname=musictube | |
pkgver=1.6 | |
pkgrel=1 | |
pkgdesc="YouTube streaming music player" | |
arch=('x86_64') | |
url="http://flavio.tordini.org/musictube" | |
license=('Proprietary') |
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
// tslint:disable:max-file-line-count | |
declare namespace SemanticUI { | |
type JQuerySelectorOrElement = string | Element | JQuery; | |
type AnimationDuration = string | number; // '500ms' | |
type AnimationName = 'scale' | 'scale in' | 'scale out' | |
| 'fade' | 'fade up' | 'fade down' | 'fade left' | 'fade right' | |
| 'fade in' | 'fade up in' | 'fade down in' | 'fade left in' | 'fade right in' |
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/sh | |
echo "Not a script..." >&2 && exit 1 | |
# This is more or less a TL;DR; procedure to create and use an encrypted volume contained in a file instead of a physical drive/partition. | |
# The encryption options are set to sane (and IMHO secure) values. The device will be (un)locked using a password. | |
# The mounting is done manually by the root and all users can access the mounted filesystem. | |
################ | |
# REQUIREMENTS # |
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
/* | |
* Maximizes the height of an element, using flex laytout, | |
* by applying classes to the element and it's parents. | |
* Warning: It breaks a lot of layouts and it is not a substitute for proper, | |
* hand-crafted code. Also, it is not really tested! | |
*/ | |
/** Shorthand for `toggleMaxHeightElem(..., isMaximize = true)` */ | |
function maximizeElemHeight(elem, topParent = 'html') { | |
toggleMaxHeightElem(elem, topParent, 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
<!-- assuming you have placed this outside `dist` dir --> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Quasar Component Demo</title> | |
<link rel="stylesheet" href="./dist/myComponent.css"> | |
</head> | |
<body> | |
<div id="my-component-selector"></div> |
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
import Vue from 'vue'; | |
import {quasarInit} from './quasar'; | |
// props are required if you want to be able to do `vm.$data.myProp = 'xyz'` later | |
export function createComponent(component, elementOrSelector, props = {}) { | |
const el = resolveElement(elementOrSelector); | |
let origHtml = el.innerHTML; | |
Vue.config.productionTip = false; | |
quasarInit(); |
OlderNewer