If you have the latest sublime text (version 4), you can just do:
subl --safe-mode
/* | |
* Copyright 2017 M.Ala Eddine. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
const express = require('express'); | |
const app = express(); | |
const AWS = require('aws-sdk'); | |
const fs = require('fs'); | |
const fileType = require('file-type'); | |
const multiparty = require('multiparty'); | |
// configure the keys for accessing AWS | |
AWS.config.update({ | |
accessKeyId: process.env.AWS_ACCESS_KEY_ID, |
// The polling function | |
function poll(fn, timeout, interval) { | |
var endTime = Number(new Date()) + (timeout || 2000); | |
interval = interval || 100; | |
var checkCondition = function(resolve, reject) { | |
var ajax = fn(); | |
// dive into the ajax promise | |
ajax.then( function(response){ | |
// If the condition is met, we're done! |
import javafx.animation.Animation; | |
import javafx.animation.Animation.Status; | |
import javafx.animation.KeyFrame; | |
import javafx.animation.KeyValue; | |
import javafx.animation.Timeline; | |
import javafx.beans.value.ChangeListener; | |
import javafx.beans.value.ObservableValue; | |
import javafx.scene.layout.Pane; | |
import javafx.scene.shape.Rectangle; | |
import javafx.scene.text.Text; |
/* | |
* Copyright 2017 Realm Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
// | |
// Copyright 2015 Google Inc. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software |
// Usage: | |
// $('.box').parentToAnimate($('.new-parent'), 200); | |
// $('.box').parentToAnimate($('.new-parent'), 'slow'); | |
// $('.box').parentToAnimate('.new-parent', 'slow'); | |
jQuery.fn.extend({ | |
// Modified and Updated by MLM | |
// Origin: Davy8 (http://stackoverflow.com/a/5212193/796832) | |
parentToAnimate: function(newParent, duration) { | |
duration = duration || 'slow'; |
# Installation --- | |
# 1. In Bitbucket, add FTP_USERNAME, FTP_PASSWORD and FTP_HOST as environment variables. | |
# 2. Commit this file (bitbucket-pipelines.yml) to your repo (in the repo root dir) | |
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will | |
# push everything and initialize GitFTP) | |
# | |
# Usage --- | |
# - On each commit to master branch, it'll push all files to the $FTP_HOST | |
# - You also have the option to 'init' (see 'Installation' above) - pushes everything and initialises | |
# - Finally you can also 'deploy-all' (from Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:deploy-all) |
// <just add your project's package name here if necessary> | |
import javafx.scene.control.TextField; | |
// input manager for JavaFX TextFields | |
public class TextFieldManager { | |
// limits text input | |
public static void addTextLimit (TextField textField, int limit) { | |
// fired by every text property change |