LUAR
- Download and install lua 5.1
- Download and install luarocks
luarocks install luacrypto OPENSSL_DIR=/usr/local/opt/openssl OPENSSL_INCDIR=/usr/local/opt/openssl/includeluarocks install lapis
| def remove_scheduled_resque_job(&block) | |
| [].tap do |processed| | |
| $redis.scan_each(match: "resque:delayed:*") do |key| | |
| $redis.lrange(key, 0, -1).each do |value| | |
| begin | |
| payload = ActiveSupport::JSON.decode(value) | |
| if yield(payload) | |
| $redis.lrem(key, 1, value) | |
| processed << value | |
| end |
| # See https://bugsnag.com/docs/api | |
| # Usage: | |
| # client = BugsnagApiClient.with_token('<your account token>') | |
| # data = client.with_error('<error id>').events(start_time: 5.days.ago, per_page: 30).map {|e| e['meta_data']['Custom']['target_id'] } | |
| class BugsnagApiClient | |
| attr_reader :rest_client | |
| def self.with_token(bugsnag_auth_token) | |
| rc = RestClient::Resource.new('https://api.bugsnag.com', headers: {'Authorization' => "token #{bugsnag_auth_token}"}) | |
| new(rc) |
LUAR
luarocks install luacrypto OPENSSL_DIR=/usr/local/opt/openssl OPENSSL_INCDIR=/usr/local/opt/openssl/includeluarocks install lapis| var obj; | |
| var compound; | |
| obj = function(name) { | |
| var instance = { | |
| name: name, | |
| componenttype: obj, | |
| }; | |
| var components = compound(instance); | |
| instance.components = components; | |
| instance.event = function(name, args) { |