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
(async () => { | |
try { | |
const image = await fin.Window.getCurrentSync().getSnapshot({ | |
height: 100, | |
width: 100, | |
x: 10, | |
y: 10, | |
}); | |
const res = await fetch(`data:image/png;base64,${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
function downloadRuntime(delayInMinutes) { | |
const downloadOptions = { | |
//Specific version number required, if given a release channel the call will produce an error. | |
version: '6.49.21.9' | |
}; | |
setTimeout(() => { | |
fin.desktop.System.downloadRuntime(downloadOptions, progress => { | |
document.open(); |
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 | |
curl -s https://cdn.openfin.co/release/runtime/$1 | grep . | |
## usage: | |
## > ./whatis.sh beta | |
## 6.49.20.21 |
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 | |
git clone git@github.com:rdepena/of-template.git $1 && cd $1 && npm install | |
# in .zshrc: | |
#alias oftemplate='~/Documents/Projects/of-template-getter/of-template.sh' |
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 | |
# This scripts starts up cmus with media key support. | |
# Project cmus-mediakeys only works under node 0.10 | |
# So we need nvm. | |
# https://github.com/creationix/nvm | |
source ~/.nvm/nvm.sh | |
nvm use 0.10 | |
# now we can launch the node mediakeys app and cmus. |
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
using System; | |
using Openfin.Desktop; | |
using Newtonsoft.Json.Linq; | |
class Program | |
{ | |
static void Main() | |
{ | |
//These are the OpenFin Runtime Optons. | |
var runtimeOptions = new RuntimeOptions { |
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
using System; | |
using Openfin.Desktop; | |
using Newtonsoft.Json.Linq; | |
namespace SimpleConnection | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
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 gulp = require('gulp'), | |
openfinConfigBuilder = require('openfin-config-builder'), | |
openfinLauncher = require('openfin-launcher'), | |
path = require('path'); | |
function createConfig() { | |
return openfinConfigBuilder.create({ | |
startup_app: { | |
name: 'myApp', | |
url: 'http://openfin.co' |
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
#z::Run www.autohotkey.com | |
^!n:: | |
IfWinExist Untitled - Notepad | |
WinActivate | |
else | |
Run Notepad | |
return | |
LWin::LCtrl |
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
//we will look at promises, they are a different way to do asynchronous and part of ES6 (available in chrome 35). | |
//we will need to create plenty of asynk functions to see promises in use, | |
//so this decorator makes functions asynkish. | |
var asynkify = function (func) { | |
return function () { | |
var delay = Math.floor(Math.random() * 2000), | |
args = Array.prototype.slice.call(arguments, 0); | |
setTimeout(function (){ |
NewerOlder