Skip to content

Instantly share code, notes, and snippets.

View hurdad's full-sized avatar

Alexander Hurd hurdad

View GitHub Profile
[nextgen@rdodgsd13 tmp]$ sudo fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: 30190F33-4E68-43C5-B93C-4427EC5A7F08
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
import http.server
import socketserver
PORT = 4200
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("serving at port", PORT)
httpd.serve_forever()
from kafka import KafkaConsumer
# To consume latest messages and auto-commit offsets
consumer = KafkaConsumer('collectd',
group_id='my-group',
bootstrap_servers="localhost:9092")
for message in consumer:
# message value and key are raw bytes -- decode if necessary!
sudo mkdir -p /var/run/hadoop-hdfs/
sudo chown hdfs:hadoop /var/run/hadoop-hdfs/
sudo /etc/init.d/hadoop-hdfs-datanode restart
sudo -u hdfs hadoop fs -mkdir -p /var/log/hadoop-yarn/apps
sudo -u hdfs hadoop fs -chown yarn /var/log/hadoop-yarn/apps
[cloudera-cdh6]
# Packages for Cloudera's Distribution for Hadoop, Version 6, on RedHat or CentOS 7 x86_64
name=Cloudera's Distribution for Hadoop, Version 6
baseurl=https://archive.cloudera.com/cdh6/6.3.0/redhat7/yum/
gpgkey=https://archive.cloudera.com/cdh6/6.3.0/redhat7/yum/RPM-GPG-KEY-cloudera
gpgcheck = 1
% firpfbch_crcf_synthesis_example.m: auto-generated file
clear all;
close all;
num_channels = 16;
m = 5;
num_frames = 25;
h_len = 2*num_channels*m+1;
num_samples = num_frames*num_channels;
h = zeros(1,h_len);
# Create the directory to store the configuration file.
sudo mkdir -p /etc/systemd/system/docker.service.d
# Create a new file to store the daemon options.
sudo nano /etc/systemd/system/docker.service.d/options.conf
# Now make it look like this and save the file when you're done:
[Service]
ExecStart=
@hurdad
hurdad / gist:468b10905602180ec1cb26b32885ee19
Created May 5, 2019 05:28
Install MySQL8 on CentOS 7
`Go to the download page for MySQL Yum repository at [https://dev.mysql.com/downloads/repo/yum/]
- ```sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm```
- ```sudo yum install mysql-community-server```
- ```sudo systemctl start mysqld.service```
- ```sudo systemctl enable mysqld.service```
- ```sudo grep 'temporary password' /var/log/mysqld.log```
- ```mysql -uroot -p```
- ```ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';```