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
/* | |
MIT License | |
Copyright (c) 2024 S. Zachariah Sprackett <[email protected]> | |
Control Aputure Amaran Lights via websocket to the amaran Desktop application. | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
SugaBooga : ~/sensu-plugin-spec [master●●] [0] $ bundle exec bin/sensu-plugin-spec -p ../sensu_plugin/plugin-test | |
Run options: --seed 37690 | |
# Running: | |
........ | |
Finished in 0.547995s, 14.5987 runs/s, 14.5987 assertions/s. | |
8 runs, 8 assertions, 0 failures, 0 errors, 0 skips |
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
SugaBooga : ~/t [0] $ VAGRANT_LOG=debug /Applications/Vagrant/bin/vagrant up --provider=vmware_fusion | |
INFO global: Vagrant version: 1.4.1 | |
INFO global: Ruby version: 2.0.0 | |
INFO global: RubyGems version: 2.0.14 | |
INFO global: VAGRANT_LOG="debug" | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_DETECTED_OS="Darwin" | |
INFO global: VAGRANT_INSTALLER_ENV="1" | |
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1/plugins/commands/box/plugin.rb |
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
import json | |
import requests | |
url = "<<instanceurl>>/rest/v10/oauth2/token" | |
payload = {"grant_type":"password","username":"<<username>>","password":"<<password>>","client_id":"sugar"} | |
r = requests.post(url, data=json.dumps(payload)) | |
response = json.loads(r.text) |
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
# this works | |
it { should \ | |
contain_file("/etc/httpd/vhosts.d/#{t}.sjc.sugarcrm.pvt.conf")\ | |
.with_content(/ServerName #{t}.sjc.sugarcrm.pvt/) } | |
# this ignores the argument and tests for an empty file | |
it { should \ | |
contain_file("/etc/httpd/vhosts.d/#{t}.sjc.sugarcrm.pvt.conf")\ | |
.without_content(/VirtualHost \*:443/) } |
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
this.loadAccessToken = function(pService) | |
{ | |
Ti.API.debug('Loading access token for service [' + pService + '].'); | |
try | |
{ | |
var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirect | |
ory, pService + '.config'); | |
} | |
catch(ex) |
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
[DEBUG] [6,22944] Loading access token for service [twitter]. | |
[TRACE] D/dalvikvm( 1221): GC_FOR_MALLOC freed 12882 objects / 779768 bytes in 110ms | |
[DEBUG] [204,23148] got contents | |
[DEBUG] [1,23149] Parsing config | |
[TRACE] E/TiBlob ( 1221): (kroll$4) [35,23184] /data/data/net.damagestudios.Linux.com/app_appdata/twitter.config (No such file or directory) | |
[TRACE] E/TiBlob ( 1221): java.io.FileNotFoundException: /data/data/net.damagestudios.Linux.com/app_appdata/twitter.config (No such file or directory) | |
[TRACE] E/TiBlob ( 1221): at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method) | |
[TRACE] E/TiBlob ( 1221): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152) | |
[TRACE] E/TiBlob ( 1221): at java.io.FileInputStream.<init>(FileInputStream.java:82) | |
[TRACE] E/TiBlob ( 1221): at org.appcelerator.titanium.io.TiFile.getInputStream(TiFile.java:217) |