This file contains 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
#!/usr/bin/env bash | |
# LetsEncrypt certbot refresh hook for Unifi and Unifi Video | |
# Place this into /etc/letsencrypt/renewal-hooks/post/ and make it executable | |
# Inspired by script from here: https://source.sosdg.org/brielle/lets-encrypt-scripts | |
# Author: Ben Klang <bklang@wirehack.net> | |
MAINDOMAIN="REPLACE.ME.WITH.YOUR.DOMAIN.com" | |
set -e | |
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" |
This file contains 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
[adhearsion] | |
exten => _.,1,AGI(agi://localhost/adhearsion) |
This file contains 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
$ make | |
make[1]: Entering directory `/export/home/admin/asterisk-11-svn' | |
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts | |
make[2]: Entering directory `/export/home/admin/asterisk-11-svn/menuselect' | |
make[2]: `makeopts' is up to date. | |
make[2]: Leaving directory `/export/home/admin/asterisk-11-svn/menuselect' | |
[CC] res_rtp_asterisk.c -> res_rtp_asterisk.o | |
In file included from /export/home/admin/asterisk-11-svn/include/asterisk/stun.h:29, | |
from res_rtp_asterisk.c:51: | |
/export/home/admin/asterisk-11-svn/include/asterisk/network.h: In function `inaddrcmp': |
This file contains 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
require 'date' | |
def upcoming_presentations | |
@upcoming_presentations ||= [ | |
[ | |
DateTime.parse('2012-08-30 09:20:00 -0300')...DateTime.parse('2012-08-30 10:10:00 -0300'), | |
{:title => 'POR AMOR AO CÓDIGO', :speaker => 'BRUCE WILLIAMS'} | |
], | |
[ | |
DateTime.parse('2012-08-30 10:40:00 -0300')...DateTime.parse('2012-08-30 11:30:00 -0300'), |
This file contains 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
require 'ipaddr' | |
class Dhcpsink | |
class Parser | |
UnsupportedVersionError = Class.new StandardError | |
UnsupportedMessageTypeError = Class.new StandardError | |
ShortPacketError = Class.new StandardError | |
# From OpenBSD src/usr.sbin/dhcpd/sync.h line 45: | |
# struct dhcp_synchdr { |
This file contains 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
robocall { | |
answer | |
# Join conference room based on dialed extension, in this case 8621 | |
dial("WOOMERA/conf:#{variables[:exten]}") | |
hangup | |
} | |
noisemaker { | |
answer | |
play 'tt-monkeys' |
This file contains 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
menu 'my_menu_prompt', :timeout => 5.seconds, :tries => 2 do |link| | |
options.each do |digit, context| | |
link.send context.to_sym, digit | |
end | |
end |
This file contains 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
require 'rubygems' | |
require 'pry' | |
#require 'rbtrace' | |
puts $$ | |
threads = [] | |
threads << Thread.new do | |
loop do | |
puts "Thread 1" | |
sleep 1 |
This file contains 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
trigger_context { | |
ami = Adhearsion::VoIP::Asterisk.manager_interface | |
ami.originate :Channel => 'Local/s@local-meetme', :Application => 'AGI', :Data => 'agi://localhost/play_announce' | |
} | |
play_announce { | |
play 'my-super-cool-announcement', 'thanks-and-goodbye' | |
} |
This file contains 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
Failures: | |
1) play command multiple strings can be passed to play, causing multiple playback commands to be issued | |
Failure/Error: output_stream_matches(/playback "#{audio_file}"/) | |
RegexpError: | |
empty range in char class: /playback "["cents-per-minute", "o-hai"]"/ | |
# ./spec/voip/asterisk/commands_spec.rb:137:in `block in pbx_was_asked_to_play' | |
# ./spec/voip/asterisk/commands_spec.rb:136:in `each' | |
# ./spec/voip/asterisk/commands_spec.rb:136:in `pbx_was_asked_to_play' | |
# ./spec/voip/asterisk/commands_spec.rb:315:in `block (2 levels) in <top (required)>' |
NewerOlder