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>Virtualbox</name> | |
<identifier>private.test</identifier> | |
<only>VIRTUALMACHINE</only> | |
<autogen>__KeyToKey__ KeyCode::Z, VK_COMMAND, KeyCode::Z, VK_CONTROL</autogen> | |
<autogen>__KeyToKey__ KeyCode::S, VK_COMMAND, KeyCode::S, VK_CONTROL</autogen> | |
<autogen>__KeyToKey__ KeyCode::X, VK_COMMAND, KeyCode::X, VK_CONTROL</autogen> | |
<autogen>__KeyToKey__ KeyCode::C, VK_COMMAND, KeyCode::C, VK_CONTROL</autogen> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<title>Demo of static tabs</title> | |
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" /> | |
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script> | |
<script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js"></script> | |
<script type="text/javascript" src="js/jquery-staticTabs.js"></script> | |
<script type="text/javascript"> |
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
{ | |
"name": "react-stack", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", |
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
function syncMouseEvent(event) { | |
api.syncEvent({ | |
x: event.clientX, | |
y: event.clientY | |
}) | |
.then((result) => { | |
console.log('successfully synced a mouse event'); | |
}) | |
.catch((reason) => { | |
console.error('got an error while trying to sync an event') |
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
var promise = Promise.resolve(new Date()); | |
promise.then((date) => console.log(date)); | |
setTimeout(() => promise.then((date) => console.log(date)), 2000); | |
// OUTPUT | |
// 2017–06–14T17:55:43.322Z | |
// 2017–06–14T17:55:43.322Z |
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
const pendingItems = new Rx.Subject(); | |
pendingItems.subscribe((item) => { | |
api.syncEvent(item) | |
.then((result) => { | |
console.log('successfully synced a mouse event'); | |
}) | |
.catch((reason) => { | |
console.error('got an error while trying to sync an event') | |
}); |
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
const pendingItems = new Rx.Subject(); | |
pendingItems.subscribe((item) => { | |
api.syncEvent(item) | |
.then((result) => { | |
console.log('successfully synced a mouse event'); | |
}) | |
.catch((reason) => { | |
console.error('got an error while trying to sync an event, going to try again'); | |
pendingItems.next(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
const pendingItems = new Rx.Subject(); | |
const maxRetries = 3; | |
const queue = (item) => { | |
let workingItem = item; | |
if (!workingItem.sync) { | |
workingItem = { | |
sync: { counter: 0 }, | |
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
pendingItems | |
.map(item => Rx.Observable.of(item).delay(item.sync.counter > 0 ? delayBetweenRetries : 0)) | |
.mergeAll() | |
.subscribe((itemWithMetaData) => { | |
api.syncEvent(itemWithMetaData.item) | |
.then((result) => { | |
console.log('successfully synced a mouse event'); | |
}) | |
.catch((reason) => { | |
console.error('got an error while trying to sync an event, going to try again'); |
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
const sync = createSync({ | |
maxRetries: 3, | |
delayBetweenRetries: 2000, | |
syncAction: api.syncEvent, | |
}); | |
// success | |
sync.syncedItems.subscribe(x => console.log(x.item)); | |
// failure |
OlderNewer