Skip to content

Instantly share code, notes, and snippets.

@geku
geku / iptv.md
Created October 21, 2018 18:08
IPTV

#EXTM3U #EXTINF:-1 ,360 rtp://239.186.64.204:10000 #EXTINF:-1 ,2M Monde rtp://239.186.64.194:10000 #EXTINF:-1 ,3+ rtp://239.186.64.56:10000 #EXTINF:-1 ,3+ HD rtp://239.186.68.14:10000 #EXTINF:-1 ,3sat CH

@geku
geku / ip.md
Created January 12, 2018 07:37
  1. 54.93.236.168
  2. 54.93.123.251
  3. 18.194.209.86
  4. 54.93.197.145
  5. 54.93.191.92
  6. 18.196.30.131
  7. 52.59.208.46
  8. 54.93.186.28
  9. 35.158.92.8
  10. 18.194.209.179
Jan 26 11:11:36 peng-minion1-dev-v2.kubernetes confd[4278]: 2016-01-26T11:11:36Z peng-minion1-dev-v2.kubernetes /opt/bin/confd[4278]:
ERROR 501: All the given peers are not reachable (failed to propose on members [{"message":"proxy: zero endpoints currently available"}]
twice [last error: Get %7B%22message%22:%22proxy:%20zero%20endpoints%20currently%20available%22%7D/v2/keys/?quorum=false&recursive=true&sorted=false: unsupported protocol scheme ""]) [0]
@geku
geku / config
Last active February 22, 2016 09:15
Logstash config
input {
file {
type => "apache"
path => [ "/data/*.log" ]
start_position => "beginning"
}
}
filter {
@geku
geku / consul-docker.md
Last active June 4, 2016 11:58
Run Consul in Docker container

Assumptions

Consul Command

docker run -d -h node1 -v /mnt:/data \
    -p <public-IP>:8300:8300 \

-p :8301:8301 \

@geku
geku / gist:6424877
Created September 3, 2013 14:42
Demo State Machine
class Baba
state_machine :initial => :parked do
event :ignite do
transition :parked => :idling, :if => :ignite_car
transition :parked => :ignition_failed
end
event :park do
transition :idling => :parked
@geku
geku / let_test.rb
Created July 1, 2013 21:12
Q quick test to show how MiniTest let works. The let block is reevaluated for everytime, so it is basically the same as before but lazily evaluated whereas before is executed always even if none of the results are used for a test.
require 'rubygems'
require 'minitest/autorun'
describe 'let_test' do
let(:sub) {
puts " - lazy :sub called"
true
}
@geku
geku / example.rb
Created May 29, 2013 16:21
Streaming example with CURB
require 'sinatra/base'
server = Thread.new do
class Example < Sinatra::Base
set :server, :thin
get '/' do
stream(:keep_open) do |out|
5.times {
out << "streaming output\n"
sleep 1
-- control frame ----------
c:0028 p:---- s:0096 b:0096 l:000095 d:000095 CFUNC :initialize
c:0027 p:---- s:0094 b:0094 l:000093 d:000093 CFUNC :new
c:0026 p:0019 s:0091 b:0091 l:000090 d:000090 METHOD /var/vcap.local/dea/apps/railsfoundry-0-db3a152927b554088855f076db66b07c/app/rubygems/ruby/1.9.1/gems/thin-1.2.11/lib/thin/requ
c:0025 p:---- s:0088 b:0088 l:000087 d:000087 FINISH
c:0024 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC :new
c:0023 p:0017 s:0083 b:0083 l:000082 d:000082 METHOD /var/vcap.local/dea/apps/railsfoundry-0-db3a152927b554088855f076db66b07c/app/rubygems/ruby/1.9.1/gems/thin-1.2.11/lib/thin/conn
c:0022 p:0043 s:0080 b:0080 l:000072 d:000079 BLOCK /var/vcap.local/dea/apps/railsfoundry-0-db3a152927b554088855f076db66b07c/app/rubygems/ruby/1.9.1/gems/eventmachine-0.12.10/lib/
c:0021 p:---- s:0078 b:0078 l:000077 d:000077 FINISH
c:0020 p:---- s:0076 b:0076 l:000075 d:000075 CFUNC :instance_eval
$(document).ready ->
$('a.console').click ->
console.log($(this).text() + ' clicked')
return false