This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- xcode-select --install | |
- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
- export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH" | |
- brew install coreutils | |
- sort -R | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start here: | |
http://docs.memsql.com/4.1/setup/docker/ | |
create database test; | |
use test; | |
CREATE TABLE test_table (id BIGINT PRIMARY KEY AUTO_INCREMENT, c INT); | |
INSERT INTO test_table (c) VALUES (1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install ZD(http://docs.zoomdata.com/docker-install) | |
2. Install MemSQL(http://docs.memsql.com/4.1/setup/docker/) | |
3. In docker shell: | |
- docker run -d -p 3306:3306 -p 9000:9000 --name memsql memsql/quickstart | |
- docker run --rm -it --link=memsql:memsql memsql/quickstart memsql-shell | |
4. Install DbVisualizer (https://www.dbvis.com/download/) | |
5. docker stop default | |
6. open VirtualBox, give at least 8192MB RAM + 4 Cores under processor | |
7. ZD, login as Supervisor, click advanced, enable MemSQL | |
8. ZD, connection: jdbc:mysql://192.168.99.100:3306/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
i="1" | |
while [ $i -lt 5 ] | |
do | |
url="https://dumps.wikimedia.org/other/pagecounts-raw/2016/2016-0$i/md5sums.txt" | |
echo $url | |
wget -q $url | |
cat md5sums.txt | grep pagecounts | cut -d" " -f3 > md5names.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in *.top; do | |
f_notop=${f/.top/} | |
IFS='-' read -r -a array <<< "$f_notop" | |
date=${array[1]} | |
hour=${array[2]} | |
first=0 | |
while read p; do | |
IFS=' ' read -r -a tokens <<< "$p" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin/kafka-topics.sh --zookeeper $KAFKAZK --describe --topic simple1 | |
bin/kafka-topics.sh --zookeeper $KAFKAZK --alter --topic simple1 --config delete.retention.ms=5000 | |
bin/kafka-topics.sh --zookeeper $KAFKAZK --alter --topic simple1 --config retention.ms=10000 | |
bin/kafka-console-consumer.sh --zookeeper $KAFKAZK --topic simple1 --from-beginning | |
wget http://www-us.apache.org/dist/kafka/0.8.2.2/kafka_2.9.1-0.8.2.2.tgz | |
tar -xvf kafka_2.9.1-0.8.2.2.tgz | |
OR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove space used: | |
docker ps -a | |
docker rm < <IMAGE_NAME> | |
docker volume ls | |
docker volume rm <VOLUME_NAME> | |
sudo service docker stop | |
sudo rm -rf /var/lib/docker | |
sudo service docker start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Abiu | |
Acai | |
Acerola | |
Ackee | |
Agave | |
Aizen | |
Alligator | |
Amazon | |
Ambarella | |
Apple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
with open('fruits') as f: | |
d = dict([x.rstrip(),1] for x in f) | |
fruit = raw_input('Enter fruit: ').title() | |
if fruit in d: | |
print('Got it!') | |
else: | |
print('No luck!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Clipboard Manager OSX: https://fiplab.com/apps/copyclip-for-mac (Ditto for Windows) |
OlderNewer