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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| type SharedRequest struct { | |
| data string |
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
| package main | |
| import ( | |
| "fmt" | |
| "runtime" | |
| "sync" | |
| ) | |
| var wg sync.WaitGroup |
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
| class LoadTest | |
| def initialize(time:, rate:, pool:) | |
| @time = time | |
| @rate = rate | |
| @pool = pool | |
| @requests = [] | |
| @started = false | |
| @shutdown = false | |
| @lock = Mutex.new | |
| @cond = ConditionVariable.new |
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
| version: 2.0 | |
| jobs: | |
| build: | |
| working_directory: ~/prism | |
| docker: | |
| - image: ruby:2.2.4-alpine | |
| - image: percona:5.6.35 | |
| environment: | |
| - MYSQL_ROOT_PASSWORD= |
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
| location ^~ /assets/ { | |
| gzip_static on; | |
| expires max; | |
| add_header Cache-Control public; | |
| add_header Access-Control-Allow-Origin *; | |
| } |
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
| class UpdateCounters < ActiveRecord::Migration | |
| def up | |
| say_with_time 'Updating counter_cache_column for ModelWithColumn' do | |
| ActiveRecord::Base.connection.execute <<-SQL | |
| UPDATE model_with_column | |
| SET counter_cache_column = ( | |
| SELECT COUNT(*) | |
| FROM model_with_counter_cache | |
| WHERE model_with_counter_cache.reference = model_with_column.id | |
| ) |
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
| class User < ActiveRecord::Base | |
| attr_accessor :just_created | |
| after_create :set_just_created | |
| def just_created? | |
| !!just_created | |
| end | |
| private | |
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 is ApacheBench, Version 2.3 <$Revision: 1554214 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking biginterview.com (be patient) | |
| Completed 100 requests | |
| Completed 200 requests | |
| Completed 300 requests | |
| Completed 400 requests | |
| Completed 500 requests |
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
| Process: Atom Helper [76665] | |
| Path: /Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper | |
| Identifier: com.github.atom.helper | |
| Version: 0.146.0 (0.146.0) | |
| Code Type: X86-64 (Native) | |
| Parent Process: Atom [73996] | |
| Responsible: Atom [73996] | |
| User ID: 501 | |
| Date/Time: 2014-11-13 17:06:29.571 -0500 |
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
| # Embed the player | |
| swfobject.embedSWF url, 'BIVideoPlayer', width, height, swfVersion, xiSwfUrl, | |
| callback: 'customCallback' | |
| playerId: 'BIVideoPlayer' | |
| # Flash Event Handler | |
| window.customCallback = (event, playerId, data) -> | |
| selector = "#" + playerId | |
| jQuery(selector).trigger(event, data) |