- Access the API Mate: http://mconf.github.io/api-mate/
- Create a new meeting.
- Join this meeting to make sure it won't be removed from the server in case you take too long to run the other steps.
- Use
getDefaultConfigXML
via GET to get the defaultconfig.xml
. - Copy and paste this
config.xml
into a new file. Edit it to remove any special characters (e.g. you might have HTML tags in the copyright field, so you have to remove or escape them). - Edit your
config.xml
according to your needs. - Put the edited XML content in the "XML for setConfigXML via POST" field in the API Mate.
- Instead of using the API Mate to call
setConfigXML
(don't just click in the link), use another tool that runs outside of the browser.curl
is a good option. First, copy the link the API Mate generated tosetConfigXML
. It will be a really long URL. Then use it withcurl
(replace<link>
by the URL):
This file contains hidden or 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
module God | |
module Conditions | |
class RestartFileTouched < PollCondition | |
attr_accessor :restart_file | |
def initialize | |
super | |
end | |
def process_start_time | |
Time.parse(`ps -o lstart -p #{self.watch.pid} --no-heading`) |
This file contains hidden or 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
Call the helpers 'javascript_include_tags_for_action' and 'stylesheet_link_tags_for_action' in the headers section | |
of your layout to automatically include javascript and stylesheet files for the current controller and action. | |
The files are included only if they exist. It is first included the file for all the actions of acontroller (e.g 'events/_all.js') | |
and then the file for the current action (e.g. 'events/show.js'). | |
You can organize javascripts and stylesheets like views are organized. | |
Assuming you have the controllers "Events" and "Spaces": | |
- app/ |
This file contains hidden or 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
# Ensures the model has an attr_accessor, attr_reader or attr_writer | |
# Examples: | |
# it { should have_attr_accessor(:value) } | |
# it { should have_attr_accessor(:value).read_only } | |
# it { should have_attr_accessor(:value).write_only } | |
module Shoulda | |
module Matchers | |
module ActiveModel # :nodoc | |
def have_attr_accessor(attribute) |
Config Apache with /etc/apache2/conf-available/le.conf
:
Alias /.well-known/acme-challenge/ "/var/www/html/.well-known/acme-challenge/"
<Directory "/var/www/html/">
AllowOverride None
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
This file contains hidden or 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
MOODLE_HOME="/var/www/moodle" | |
MOODLE_DATA="/var/www/moodle/moodledata" | |
sudo mkdir -p $MOODLE_DATA/lang/pt_br | |
cd $MOODLE_HOME | |
sudo wget https://github.com/mconf/moodle-mod_bigbluebuttonbn/archive/v2.2-elos.zip | |
sudo unzip v2.2-elos.zip | |
sudo mv moodle-mod_bigbluebuttonbn-2.2-elos mod/bigbluebuttonbn | |
cp mod/bigbluebuttonbn/lang/pt_br/bigbluebuttonbn.php $MOODLE_DATA/lang/pt_br/bigbluebuttonbn.php |
Got the following errors trying to install aptitude on a clean Ubuntu 18.04 on DigitalOcean:
$ sudo apt install aptitude
The following packages have unmet dependencies:
aptitude : Depends: libapt-pkg6.0 (>= 1.9.11~) but it is not installable
Depends: libboost-iostreams1.71.0 but it is not installable
Depends: libcwidget4 (>= 0.5.18-1) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
This file contains hidden or 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 | |
# This script issues a SIGQUIT to the resque worker and waits for all jobs | |
# (forked processes) to be finished before exiting. To be used as a preStop hook | |
# for resque processes on Kubernetes. | |
# Kubernetes by default issues a SIGTERM when terminating a pod, but that causes | |
# resque to immediately kill child processes and then exit. A SIGQUIT tells resque | |
# to wait for child to finish before exiting. | |
# Set `terminationGracePeriodSeconds` to the number of seconds to wait before | |
# ignoring this preStop script and forcing the pod to terminate. |