Skip to content

Instantly share code, notes, and snippets.

View karlentwistle's full-sized avatar

Karl Entwistle karlentwistle

View GitHub Profile
@karlentwistle
karlentwistle / Easy ffmpeg install
Created April 18, 2011 09:12
This script downloads and install ffmpeg and x264 from SVN and git for the initial install
#!/bin/bash
# ffmpegin
# this sctipt downloads and install ffmpeg and x264 from SVN and git for the initial install
# taken from the excellet tutorial found here:
#http://ubuntuforums.org/showthread.php?t=786095&highlight=ffmpeg+x264+latest
# all props to fakeoutdoorsman, not me
# check http://code.google.com/p/x264-ffmpeg-up-to-date/ for updates
######################################
# ver 1.4 by rupert plumridge
@JunichiIto
JunichiIto / alias_matchers.md
Last active July 18, 2024 15:03
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created November 9, 2017 23:39
How to Reset Kafka Consumer Group Offset

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
@henrik
henrik / lgtv_turn_on.rb
Last active April 27, 2020 05:37
Ruby script to turn on a LGTV running WebOS 3, using "wake on LAN".
#!/usr/bin/ruby
# Based on: https://gist.github.com/dgv/2865897 and https://gist.github.com/zunda/187139
# Idea from: https://github.com/efpe/amazon-alexa-lg-tv
# In order for this to work, first go to the TV "General" settings and turn on "Mobile TV On".
# Change this to the actual value.
# First find the TV IP, e.g. from your router's list of connected devices.
# Then run "arp -a" on a computer and you'll see the MAC by its IP.
# Maybe you need to "ssh <the ip>" before it will turn up in arp. Not sure.
TV_MAC_ADDRESS = "xx:xx:xx:xx:xx:xx"