Skip to content

Instantly share code, notes, and snippets.

View bzurkowski's full-sized avatar
🎯
Focusing

Bartosz Żurkowski bzurkowski

🎯
Focusing
View GitHub Profile
using UnityEngine;
using Unity.WebRTC;
public class WebRTCStreamer : MonoBehaviour
{
[SerializeField] private RenderTexture gameRenderTexture;
[SerializeField] private int videoBitrate = 1000;
[SerializeField] private AudioSource gameAudioSource;
private RTCPeerConnection _peerConnection;
@bzurkowski
bzurkowski / efs-user-data.sh
Created January 12, 2017 23:45
EFS EC2 mount script
#!/bin/bash
# Setup ECS cluster
echo ECS_CLUSTER=pug-ci >> /etc/ecs/ecs.config
# Setup EFS
yum update -y
yum install -y nfs-utils
mkdir -p /mnt/efs
@bzurkowski
bzurkowski / do_plot.sh
Created December 15, 2016 00:12
gnuplot loop
for id in $(seq 100 100 9900); do
gnuplot -e "datafile='$id.data'; output='results/$id.png'" plot.plt
done
@bzurkowski
bzurkowski / fakes3.rb
Created August 2, 2016 12:30
Fakes3 symulator
module Simulators
class FakeS3Server
include Singleton
STORAGE_DIR = Rails.root.join 'public', 'fakes3'
attr_reader :pid
def self.start
instance.start
@bzurkowski
bzurkowski / syncs3.sh
Created July 25, 2016 10:00
Sync directory with S3 bucket
# collect required AWS credentials: access key, secret key, region
# setup s3cmd tool
wget https://sourceforge.net/projects/s3tools/files/s3cmd/1.6.1/s3cmd-1.6.1.tar.gz
tar -zcvf s3cmd-1.6.1.tar.gz
cd s3cmd-1.6.1
sudo python setup.py install
s3cmd --configure
# stop application in order to prevent creating new attachments
@bzurkowski
bzurkowski / logstash_matcher.rb
Created April 27, 2016 16:26
Simple TCP server simulating Logstash service
RSpec::Matchers.define :have_log_entry do |short_message, message, params|
match do |logstash|
expected_log_entry = expected_log_entry_for short_message, message, params
begin
Timeout.timeout 2 do
loop do
begin
actual_log_entries = logstash.logs
@bzurkowski
bzurkowski / Gemfile
Created July 18, 2015 13:20
S3, Paperclip, FakeS3 configuration
gem "paperclip"
gem "aws-sdk", "~> 1.6"
gem "fakes3", group: :test