Skip to content

Instantly share code, notes, and snippets.

View GlowDB's full-sized avatar
🏠
Working from home

GlowDB GlowDB

🏠
Working from home
View GitHub Profile
@GlowDB
GlowDB / directions.md
Created November 29, 2017 17:16 — forked from ab2525/directions.md
Samba4 initscript for CentOS

Installing Samba4 as a File Server

This document serves to help you set up Samba4 as a file server on CentOS 5 and 6. CentOS 6 has RPMs for Samba4, but they are not built with the requisite DC functionality you'll need for the advanced SAMBA lab. The following steps should be run as root. If you are logging in on a text-mode console, you can do this by logging in as root with the password netsys. If you are doing it in a GUI, you can elevate your privs using the command sudo -i

  1. You need to install the python development libraries and the libacl development libraries. This can be accomplished with the following command:
yum install python-devel libacl-devel
@GlowDB
GlowDB / mysql-backup-windows.bat
Created November 27, 2017 20:08 — forked from sindresorhus/mysql-backup-windows.bat
Backup MySQL databases in separate gzipped sql files on Windows
@echo off
set dbUser=root
set dbPassword=password
set backupDir="C:\Documents and Settings\user\Desktop\backup\mysql"
set mysqldump="C:\Program Files\MySQL\MySQL Workbench 5.2 CE\mysqldump.exe"
set mysqlDataDir="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data"
set zip="C:\Program Files\7-Zip\7z.exe"
:: get date
import datetime
get = datetime.datetime.now()
name = input("Your name:\n")
age = int(input("Your age:\n"))
numcopy = int(input("Number of result messages:\n"))
currYear = get.year
century = ((100-age)+currYear)
print(numcopy * ("""Hello %r. Your current age is %r and you will turn 100 in year %r\n"""
%(name,age,century)))
import datetime
get = datetime.datetime.now()
name = input("Your name:\n")
age = int(input("Your age:\n"))
numcopy = int(input("Number of result messages:\n"))
currYear = get.year
century = ((100-age)+currYear)
print(numcopy * ("""Hello %r. Your current age is %r and you will turn 100 in year %r\n"""
%(name,age,century)))
@GlowDB
GlowDB / benchmark-commands.txt
Created September 14, 2017 16:20 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@GlowDB
GlowDB / listLine.pl
Created January 5, 2017 15:56 — forked from darrenparkinson/listLine.pl
Simple Perl Script to request information from Cisco Communications Manager AXL API
#!/usr/bin/perl -w
use strict;
use warnings;
use Text::CSV;
use LWP::UserAgent;
use LWP::Protocol::https;
use HTTP::Request;
use MIME::Base64;
use XML::LibXML;