Mix.install([
{:membrane_core, "~> 1.0"},
{:membrane_rtsp, "~> 0.5.1"},
{:membrane_webrtc_plugin, "~> 0.17.0"},
{:membrane_rtc_engine,
github: "jellyfish-dev/membrane_rtc_engine",
ref: "49f2ba31ab65fa912f4112afe28b32cd274e14f2",
This file contains 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
docker run --rm -ti \ | |
--name=ctop \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
quay.io/vektorlab/ctop:latest |
This file contains 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
# A[weight] | |
# B[floor] | |
# M - floor limit | |
# X - number of people | |
# Y - weight limit | |
# | |
@total_result = 0 | |
def solution(a, b, m, x, y) |
This file contains 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 'benchmark' | |
Benchmark.bm do |r| | |
N = 10000000 | |
vals = [0, 1, 2] | |
r.report("if ") do | |
N.times do | |
current = vals.sample | |
if current == 0 |
This file contains 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
LinkedListStack = Struct.new(:top, :pop) do | |
def push(value) | |
LinkedListStack.new(value, self) | |
end | |
def empty? | |
pop.nil? | |
end | |
def self.empty |
This file contains 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
ps aux| grep -i clockwork | grep -v grep | awk '{print $2}' | xargs kill -9 |
This file contains 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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
This file contains 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
sudo su | |
cd /opt | |
wget http://nginx.org/download/nginx-1.4.4.tar.gz | |
tar -zxvf nginx-1.4.4.tar.gz | |
mkdir /opt/nginx_modules | |
cd nginx_modules | |
wget https://github.com/agentzh/redis2-nginx-module/archive/v0.10.tar.gz | |
tar -zxvf v0.10.tar.gz |
This file contains 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
#source: https://ochronus.com/git-tips-from-the-trenches/ | |
$ git rev-list --all | xargs git grep '<YOUR REGEX>' | |
$ git rev-list --all | xargs git grep -F '<YOUR STRING>' |
This file contains 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
sudo ipfw pipe 1 config bw 15KByte/s | |
creates a pipe that only allows up to 15KB/s to go through. | |
Then: | |
sudo ipfw add 1 pipe 1 src-port 80 | |
will attach that pipe to the outgoing traffic on port 80, effectively limiting the outgoing traffic of the web server. | |
sudo ipfw delete 1 | |
will remove the pipe from the port. |
NewerOlder