Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| from oauth2client.client import flow_from_clientsecrets | |
| from oauth2client.file import Storage | |
| from oauth2client.tools import run | |
| import gdata.sites.client | |
| import gdata.sites.data | |
| # How to use the OAuth 2.0 client is described here: | |
| # https://developers.google.com/api-client-library/python/guide/aaa_oauth | |
| SCOPE = 'https://sites.google.com/feeds/' |
| require "rspec/core/formatters/base_text_formatter" | |
| require 'headless' | |
| require 'fileutils' | |
| class AcceptanceVideoFormatter < RSpec::Core::Formatters::BaseTextFormatter | |
| def initialize(output) | |
| @headless = Headless.new( | |
| video: { | |
| nomouse: true, |
| var page = require('webpage').create(), | |
| MSG_SCREENSHOT = '123screenshot123'; | |
| page.onConsoleMessage = function(msg) { | |
| if (msg === MSG_SCREENSHOT) { | |
| page.render('screenshot.png'); | |
| phantom.exit() | |
| } | |
| console.log('INFO: ' + msg); | |
| }; |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2