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
private static DialogResponse showDialog(DialogTemplate template) { | |
try { | |
final FXDialog dialog = template.getDialog(); | |
Window window = dialog.getOwner(); | |
// get center of window | |
final double windowCenterX = window.getX() + (window.getWidth() / 2); | |
final double windowCenterY = window.getY() + (window.getHeight() / 2); |
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('dialogs',[]) | |
.factory('alerts', ['$document', '$timeout', function($document, $timeout){ | |
return { | |
/* Pops an alert to the top of the page. Be careful, they will stack on each other if called often (use the callback for chains) | |
* @param html HTML to display in the alert | |
* @param delay (optional) time in ms to display the alert for | |
* @param cssClass (optional) Bootstrap css alert- class (alert-success, alert-info, etc.) or a class that models off of it. | |
* @param callback (optional) Function to call once the alert is no longer displayed | |
*/ | |
slideAlert : function(html, delay, cssClass, callback) { |
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
'use strict'; | |
/** | |
* router-state-eq Directive | |
* | |
* What does this directive do? | |
* Analyses the current $state and allows us to apply a css class depending on true/false | |
* | |
* How to use it? | |
* Apply the router-state-eq="" attribute to the DOM element you want to style |
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
.directive('giveFocusTo', ['$timeout', function($timeout){ | |
return { | |
restrict: 'A', | |
link: function(scope, el, attrs){ | |
el.on('click', function(e){ | |
if(e.preventDefault === 'function'){ | |
e.preventDefault(); | |
} | |
var id = '#'+attrs.giveFocusTo; | |
var ele = angular.element(id); |
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
start on (local-filesystems and net-device-up IFACE!=lo) | |
task | |
script | |
echo "start on: $(date)" > /home/user/automount_log.txt | |
while true; do ping -c1 172.16.76.50 &> /dev/null && break; done | |
sshfs -o allow_other,uid=$(id -u),gid=$(id -g),delay_connect [email protected]:user/git/website-user/ /var/www/website_user >> /home/user/automount_log.txt 2>&1 | |
echo "end on: $(date)" >> /home/user/automount_log.txt | |
end script |
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" ?> | |
<root> | |
<replacementdef> | |
<replacementname>LowKeyRepeat</replacementname> | |
<replacementvalue>KeyRepeat::RawValue::20</replacementvalue> | |
</replacementdef> | |
<item> | |
<identifier>com.denniskinner.fastArrowKeys</identifier> | |
<name>Fast Arrow Keys</name> | |
<appendix>Arrow keys repeat every 20ms</appendix> |
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" ?> | |
<root> | |
<item> | |
<name>! Custom</name> | |
<replacementdef> | |
<replacementname>LowKeyRepeat</replacementname> | |
<replacementvalue>KeyRepeat::RawValue::20</replacementvalue> | |
</replacementdef> | |
<item> |
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
tell application "Google Chrome" | |
if it is running then | |
make new window | |
else | |
activate | |
end if | |
open location "http://di.fm" | |
set the bounds of the front window to {0, 0, 550, 800} | |
end tell |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.31090480089187622</real> | |
<key>Green Component</key> | |
<real>0.31097450852394104</real> |
OlderNewer