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
| describe "elastic search" do | |
| let (:fw) {create :firmware} | |
| before(:all) do ## SOMETIMES BEFORE EACH ## | |
| Nas.index.delete | |
| Nas.create_elasticsearch_index | |
| end | |
| it "should output nice json for nas session search" do |
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
| language: ruby | |
| cache: | |
| bundler: true | |
| apt: true | |
| rvm: | |
| - 2.0.0 | |
| env: | |
| # - TESTFOLDER=spec/models | |
| # - TESTFOLDER=spec/controllers | |
| # - TESTFOLDER=spec/routing |
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
| require "amqp" | |
| error_handler = Proc.new do |settings| | |
| puts "Failed to connect." | |
| EM.stop | |
| end | |
| Thread.new { AMQP.start( | |
| :port => 5672, | |
| :vhost => '/', |
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
| Navigation | |
| Ctrl-D "Move half-page down | |
| Ctrl-U "Move half-page up | |
| Ctrl-B "Page up | |
| Ctrl-F "Page down | |
| **Nerd Tree** | |
| Ctrl-f "Page down |
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
| before_filter: cors_filters | |
| def cors_filters | |
| headers['Access-Control-Allow-Origin'] = '*' | |
| headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS' | |
| headers['Access-Control-Request-Method'] = '*' | |
| headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization' | |
| end |
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
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require "bunny" | |
| conn = Bunny.new vhost: '/boxes', user: 'boxes', pass: 'xxx', host: '127.0.0.1' | |
| conn.start | |
| ch = conn.create_channel | |
| x = ch.topic("boxes", durable: true) |
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
| ######### Production PolkaSpots ######## | |
| HS_WANIF=`uci -P/var/state get network.wan.ifname` | |
| HS_LANIF=`uci -P/var/state get network.lan.ifname` | |
| HS_NETWORK=192.168.4.0 | |
| HS_NETMASK=255.255.255.0 | |
| HS_UAMLISTEN=192.168.4.1 | |
| HS_UAMPORT=3990 | |
| HS_UAMUIPORT=4990 | |
| # HS_DYNIP= | |
| # HS_DYNIP_MASK=255.255.255.0 |
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
| Here is a dummy gubbins.rb | |
| #!/usr/bin/ruby | |
| class Gubbins | |
| def initialize | |
| @api_url = "https://api.polkaspots.com" | |
| end |
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
| it("should call CT's api and enable alerts for a box", function() { | |
| expect($scope.box.is_monitored).toBe(false) | |
| spyOn(boxFactory, 'alerts').andCallThrough() | |
| var cont = element.find('input').controller('ngModel'); | |
| cont.$setViewValue(true); | |
| deferred.resolve({slug: 123, is_monitored: true}); | |
| $scope.$apply() | |
| expect($scope.status.processing).toBe(true) | |
| expect(boxFactory.alerts).toHaveBeenCalled(); | |
| expect($scope.box.is_monitored).toBe(true) |
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
| { | |
| "ap_mac": "00-18-0A-13-XX-XX", | |
| "unique_id": "xxx", | |
| "created_at": "20141010", | |
| "meraki_secret": "xxx", | |
| "location_id": 1294, | |
| "latitude": 52.924263174858446, | |
| "longitude": -1.4837226407115054, | |
| "day": 5, | |
| "version": 2, |
OlderNewer