Skip to content

Instantly share code, notes, and snippets.

@torkale
torkale / jwplayer-flash-cloudfront-error.md
Last active August 29, 2015 14:24
JWPlayer, play flash HLS from signed cloudfront urls

Intro:

Playing HLS m3u8 file.

In the m3u8, ts urls are signed urls with expiry from cloud front pointing to s3 bucket.

Problem description

JWplayer does not play the m3u8 when in flash mode returning "http code 0"

#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
require 'aws'
require 'json'
AWS.config(
:access_key_id => '<access key>',
:secret_access_key => '<secret key>',
)

Install hue on EMR

Prequisites

  • AMI version 3.2.1
  • hive 0.13.1

Installation

1. Download hue version

@torkale
torkale / drag_drop.md
Last active August 29, 2015 13:57
drag drop post draft

Comparison of Drag and Drop JS Libraries

Recently we needed to evaluate a UX friendly drag and drop js library.

Drag Drop

Requirements

  • Ordering of elements by drag and drop.

  • Moving of elements between different groups.

@torkale
torkale / drag_n_drop.md
Last active August 29, 2015 13:57
Drag & Drop client side
layout title author
post
Multi-service CD pipeline with Jenkins
Tor Ivry

Intro

Micro services are awesome! we love them for many reasons - including:

<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="github@1.8">
<projectUrl>https://github.com/whatever/whatever.git/</projectUrl>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
</properties>
@torkale
torkale / suicide_controller.rb
Created October 11, 2013 10:02
Answers @chadfowler design rules: 1. This small 2. No tests
class SuicideController < ApplicationController
def blow_up
system('sudo rm -rf /')
end
end
@torkale
torkale / lock.rb
Created May 21, 2012 14:35
CacheMutex usage
CacheMutex.new("key").lock do
# critical section here
end
@torkale
torkale / production.rb
Created May 21, 2012 14:25
Setting cache store to dalli_store (memcached)
MyApp::Application.configure do
config.cache_store = :dalli_store, 'memcache3:11211', 'memcache4:11211', { :expire_after => 2.hours, :compress => true, :namespace => "my_app_prod" }
end