Install xvfb
apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
Some tips at: xvfb init script for Ubuntu
Install xvfb
apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
Some tips at: xvfb init script for Ubuntu
#!/bin/bash | |
# Recursive file convertion windows-1251 --> utf-8 | |
# Place this file in the root of your site, add execute permission and run | |
# Converts *.php, *.html, *.css, *.js files. | |
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
while read file | |
do |
const HandlerRunner = require("serverless-offline/dist/lambda/handler-runner/index").default; | |
class OfflineInvalidate { | |
constructor(serverless, options) { | |
this.serverless = serverless; | |
this.hooks = { | |
"before:offline:start:init": (opts) => this.inject() | |
}; | |
this.lastRunner = {}; | |
} |
# installs to /opt/gradle | |
# existing versions are not overwritten/deleted | |
# seamless upgrades/downgrades | |
# $GRADLE_HOME points to latest *installed* (not released) | |
gradle_version=2.9 | |
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip | |
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle | |
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest | |
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh | |
. /etc/profile.d/gradle.sh |
/***************************************** | |
/* DOM touch support module | |
/*****************************************/ | |
if (!window.CustomEvent) { | |
window.CustomEvent = function (event, params) { | |
params = params || { bubbles: false, cancelable: false, detail: undefined }; | |
var evt = document.createEvent('CustomEvent'); | |
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); | |
return evt; | |
}; |
#To install: | |
# | |
#Requires coffe script installed globally: sudo npm install -g coffee-script | |
# | |
#In your git configuration (for instance, .git/config to do it at the project level), add: | |
# | |
#[merge "json_merge"] | |
# name = A custom merge driver for json files | |
# driver = coffee json_merge.coffee %O %A %B | |
# recursive = binary |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<VideoView | |
android:id="@+id/my_video_view" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_gravity="center" /> |
Raven.config(dsn, { | |
dataCallback(data) { | |
const normalize = filename => filename.split('/www/', 2)[1] | |
data.exception.values[0].stacktrace.frames.forEach(frame => { | |
frame.filename = normalize(frame.filename) | |
}) | |
data.culprit = data.exception.values[0].stacktrace.frames[0].filename |
Web applications are increasingly taking over the functions of native applications. This year has seen an increase of (streaming) audio web applications, such as Rdio, Spotify, Pandora, etc. These applications are long-running applications and provide multimedia to the user, often while the user is doing something else.
Interaction with this type of application works the same as with other applications: the user brings the tab/window in focus and manipulates the application through mouse, keyboard or other input device. Bringing the application into focus is required in order to interact with the application and thus requires the user to get out of the current workflow.
In native applications this problem is fixed by letting applications bind to specific multimedia buttons situated on the keyboard. These buttons serve as a way to interact with the media player without bringing the application into focus. This is currently impossible for web applications for t