1
0
mirror of https://github.com/bitwarden/help synced 2025-12-28 22:23:15 +00:00

Promote to Master (#748)

* initial commit

* adding quotes for the array error

* Create Gemfile

* Create Gemfile.lock

* add .nvmrc and .node-version

* removed /article from URL

* update links to work with netlify

* more fixed links

* link fixes

* update bad links

* Update netlify.toml

toml test for redirects

* article redirect

* link fixes

* Update index.html

* Update netlify.toml

* Update _config.yml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* add article back into URL for launch

* Update netlify.toml

* Update netlify.toml

* add order to categories front matter

* Update netlify.toml

* update

* sidemenu update

* Revert "sidemenu update"

This reverts commit 5441c3d35c.

* update order prop

* Navbar updates per Gary and compiler warnings

* font/style tweaks

* Update sidebar.html

* Stage Release Documentation (#739)

* initial drafts

* rewrite Custom Fields article to prioritize new context-menu option & better organize ancillary information

* edit

* edit

* Custom Field Context Menu & CAPTCHA item in release notes

* SSO relink event

* update rn

* small edits

* improve release notes titles

* fix side menu

* Edits courtest of mportune!

* update order

* link fixes

* link cleanup

* image updates and a link

* fix trailing slash

Co-authored-by: DanHillesheim <79476558+DanHillesheim@users.noreply.github.com>
This commit is contained in:
fred_the_tech_writer
2021-09-21 13:21:11 -04:00
committed by GitHub
parent 63f78e8979
commit 906e2ca0dd
3304 changed files with 386714 additions and 8864 deletions

View File

@@ -0,0 +1,43 @@
require File.dirname(__FILE__) + '/helper'
EM.run do
# Create a channel to push data to, this could be stocks...
RandChannel = EM::Channel.new
# The server simply subscribes client connections to the channel on connect,
# and unsubscribes them on disconnect.
class Server < EM::Connection
def self.start(host = '127.0.0.1', port = 8000)
EM.start_server(host, port, self)
end
def post_init
@sid = RandChannel.subscribe { |m| send_data "#{m.inspect}\n" }
end
def unbind
RandChannel.unsubscribe @sid
end
end
Server.start
# Two client connections, that just print what they receive.
2.times do
EM.connect('127.0.0.1', 8000) do |c|
c.extend EM::P::LineText2
def c.receive_line(line)
puts "Subscriber: #{signature} got #{line}"
end
EM.add_timer(2) { c.close_connection }
end
end
# This part of the example is more fake, but imagine sleep was in fact a
# long running calculation to achieve the value.
40.times do
EM.defer lambda { v = sleep(rand * 2); RandChannel << [Time.now, v] }
end
EM.add_timer(5) { EM.stop }
end

View File

@@ -0,0 +1,2 @@
require File.dirname(__FILE__) + '/helper'

View File

@@ -0,0 +1,15 @@
require File.dirname(__FILE__) + '/helper'
EM.run do
array = (1..100).to_a
tickloop = EM.tick_loop do
if array.empty?
:stop
else
puts array.shift
end
end
tickloop.on_stop { EM.stop }
end

View File

@@ -0,0 +1,32 @@
require File.dirname(__FILE__) + '/helper'
class TickCounter
attr_reader :start_time, :count
def initialize
reset
@tick_loop = EM.tick_loop(method(:tick))
end
def reset
@count = 0
@start_time = EM.current_time
end
def tick
@count += 1
end
def rate
@count / (EM.current_time - @start_time)
end
end
period = 5
EM.run do
counter = TickCounter.new
EM.add_periodic_timer(period) do
puts "Ticks per second: #{counter.rate} (mean of last #{period}s)"
counter.reset
end
end

View File

@@ -0,0 +1,2 @@
$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
require 'eventmachine'