Skip to content

Instantly share code, notes, and snippets.

View mousepotato's full-sized avatar

mousepotato mousepotato

View GitHub Profile
https://www.youtube.com/playlist?list=PLT3fEGW9LTDtWEctcOiSwdytNJrVbLb62
@mousepotato
mousepotato / Kafka commands.md
Created October 24, 2017 22:06 — forked from vkroz/Kafka commands.md
Kafka frequent commands

Kafka frequent commands

Assuming that the following environment variables are set:

  • KAFKA_HOME where Kafka is installed on local machine (e.g. /opt/kafka)
  • ZK_HOSTS identifies running zookeeper ensemble, e.g. ZK_HOSTS=192.168.0.99:2181
  • KAFKA_BROKERS identifies running Kafka brokers, e.g. KAFKA_BROKERS=192.168.0.99:9092

Server

Start Zookepper and Kafka servers

#!/bin/bash
bib=$1
wget www.finisherpix.com/photos/my-photos/currency/USD/pctrl/Photos/paction/search/pevent/ironman-703-santa-cruz-2016/pbib/${bib}.html -O a.html
awk '/\<img data-photoId/{ print $0 }' a.html | awk '{print $4}' | awk -F\" '{print "http:"$2}' | xargs wget
@mousepotato
mousepotato / 0_reuse_code.js
Created June 13, 2014 18:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mousepotato
mousepotato / clean_dot_files
Created July 14, 2013 01:18
remove all .DS_Store and .AppleDouble file
find . -name ".DS_Store" -exec rm {} \;
find . -name \.AppleDouble -exec rm -rf {} \;
@mousepotato
mousepotato / random_git_commit_msg
Created June 14, 2013 06:50
Random Commit Message
rgc() {
git commit -m"`curl -s http://whatthecommit.com/index.txt`"
}
@mousepotato
mousepotato / Add_Lines_to_Plot
Created June 13, 2013 23:17
Add line to a matlab plot
%%
% This is an example of how to add lines to a plot in MATLAB®.
%
% Read about the <http://www.mathworks.com/help/matlab/ref/line.html |line|> function in the MATLAB® documentation.
%
% Go to <http://www.mathworks.com/discovery/gallery.html MATLAB Plot Gallery>
%
% Copyright 2012 The MathWorks, Inc.
% Load the step response data