Ted's notes (@thesleepyvegan)
Ruby on Ales schedule. Notes are in order from almost all the sessions. I didn't see Choices by Ernie Miller.
Twitternets: #roa2016
Mike Moore (@blowmage)
| #!/bin/bash | |
| # Complete ZScaler installation script for Arch Linux | |
| # Confirmed to work with ZScaler 3.7.2 | |
| # Make sure the ZScaler .run file is in the current working directory. | |
| # The QT Dependencies take forever to install... make sure you've got enough battery! | |
| echo "Installing ZScaler on Arch Linux..." | |
| echo "=================================" |
| sudo ufw allow in on zcctun0 proto any from 10.0.0.0/8 to 100.64.0.1 port 9000 | |
| sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9000 | |
| sudo ufw allow in on zcctun0 proto any from 100.64.0.0/16 to 100.64.0.1 port 9010 | |
| sudo ufw allow in on zcctun0 proto udp from 100.64.0.0/16 to 100.64.0.1 |
| import unittest | |
| def enum(obj): | |
| if type(obj) == list: | |
| return EnumList(obj) | |
| elif type(obj) == dict: | |
| return EnumDict(obj) | |
| class Enumerable(object): | |
| def each(self, cb): |
Ted's notes (@thesleepyvegan)
Ruby on Ales schedule. Notes are in order from almost all the sessions. I didn't see Choices by Ernie Miller.
Twitternets: #roa2016
Mike Moore (@blowmage)
| --- tool/rbinstall.rb 2015-03-07 21:59:28.834830008 +1000 | |
| +++ tool/rbinstall.rb.patch 2015-03-07 21:59:43.202830008 +1000 | |
| @@ -711,7 +711,7 @@ | |
| install?(:ext, :comm, :gem) do | |
| begin | |
| require "zlib" | |
| - rescue LoadErroe | |
| + rescue LoadError | |
| end | |
| if defined?(Zlib) |
My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.
As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.
I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.
So, in order to profile your worker, add this to your Sidekiq configuration:
if ENV["PROFILE"]This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
| matcher | aliased to | description |
|---|---|---|
| a_truthy_value | be_truthy | a truthy value |
| a_falsey_value | be_falsey | a falsey value |
| be_falsy | be_falsey | be falsy |
| a_falsy_value | be_falsey | a falsy value |
| # The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
| # | |
| # Current known FCC address ranges: | |
| # https://news.ycombinator.com/item?id=7716915 | |
| # | |
| # Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
| # | |
| # In your nginx.conf: | |
| location / { |