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
<?php | |
//Copyright 2016 Dirk Elmendorf | |
//This simulates a slow request to a remote api | |
if (isset($_GET["seconds"]) && $_GET["seconds"] != "null") { | |
$seconds = $_GET["seconds"]; | |
} | |
else { |
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
# From http://askubuntu.com/questions/141947/headset-input-setting-as-default | |
sudo su -c 'echo "# From http://askubuntu.com/questions/141947/headset-input-setting-as-default | |
load-module module-switch-on-connect" >> /etc/pulse/default.pa ' | |
pulseaudio -k |
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
//You have to paste in each one individually since they reload the entire page on submit instead of doing ajax. | |
$("input[name=host]")[0].value = "REPLACE_WITH_DOMAIN" | |
$('select[name=record-type]').attr("selectedIndex",0) //A | |
$("input[name=target]")[0].value = "REPLACE_WITH_IP" | |
$("input[name=recordAdd]")[0].click(); | |
$("input[name=host]")[0].value = "REPLACE_WITH_DOMAIN" | |
$('select[name=record-type]').attr("selectedIndex",2) //CNAME | |
$("input[name=target]")[0].value = "REPLACE_WITH_OTHER_DOMAIN" |
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
# put this file in spec/javascripts/support directory | |
require 'barista' | |
require 'logger' | |
require File.join(Rails.root, 'config/initializers/barista_config') | |
Barista.configure do |c| | |
c.env = 'test' | |
c.logger = Logger.new(STDOUT) | |
c.logger.level = Logger::INFO |