Skip to content

Instantly share code, notes, and snippets.

View fenneh's full-sized avatar
🔥
Hi

fen fenneh

🔥
Hi
View GitHub Profile
@fenneh
fenneh / consumer.sh
Created June 7, 2017 16:28 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1
@fenneh
fenneh / benchmark-commands.txt
Created June 7, 2017 15:59 — 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
@fenneh
fenneh / Log-EphemeralStats.ps1
Created October 27, 2016 10:40
Log-EphemeralStats.ps1
<#
.SYNOPSIS
Runs in an infinite loop getting the TCP ephemeral port and listening port statistics for each local IP address and outputs the data to a text file log.
.DESCRIPTION
Runs in an infinite loop getting the TCP ephemeral port and listening port statistics for each local IP address and outputs the data to a text file log. The script writes the ephemeral port stats every 60 seconds by default. To get data from remote computers, this script requires PsExec.exe (SysInternals) to be in the same directory as this script. WARNING: Credentials passed into PSExec are sent over the network in clear text! Prevent this by logging in interactively with a domain account that has administrator rights on the target computers and not specifying credentials to this script. PsExec is a Sysinternals tool owned by Microsoft Corporation. PsExec can be downloaded for free at http://live.sysinternals.com/psexec.exe.
.Parameter CollectionInterval
This must be an integer in seconds. This is how often you
@fenneh
fenneh / gist:d818e38ad71d8a1e8d37
Created January 7, 2016 15:10 — forked from athieriot/gist:5532748
Hipchat with IRSSI

If you are adventurous, here the process to have Hipchat working in your favourite IRC client:

@fenneh
fenneh / gist:2589971
Created May 3, 2012 22:22
AVG Automatic Removal
## For 32bit (x86) machines;
PSEXEC \\Computername "C:\Program Files\AVG\AVG2012\avgmfapx.exe" /Appmode=Setup /uninstall /uilevel=Silent /dontrestart
## For 64bit (x64) machines;
PSEXEC \\Computername "C:\Program Files (x86)\AVG\AVG2012\avgmfapx.exe" /Appmode=Setup /uninstall /uilevel=Silent /dontrestart
@fenneh
fenneh / wtf.ps1
Created December 6, 2013 15:10
Dan PS
$computers = Read-Host 'List computers to run against seperated by commas'
foreach($computer in $computers){
$width = (Get-WmiObject -ComputerName $computer -Class Win32_Processor).addresswidth
If($width -eq 64) Then
{psexec \\$computer msiexec /i \\Ukpddc01\netlogon\NSClient++\NSCP-0.4.1.102-x64.msi /quiet /norestart /log \\$computer\c$\NSClientInstall.log}
Else($width -eq 32) Then
{psexec \\$computer msiexec /i \\Ukpddc01\netlogon\NSClient++\NSCP-0.4.1.102-Win32.msi /quiet /norestart/log \\$computer\c$\NSClientInstall.log}
End If
}
@fenneh
fenneh / gist:5653601
Created May 26, 2013 18:24
Dururuirururmu Rotations
/ra G1 :: Red -> Blue -> Yellow :: Esinar, Tonz, Droodz, Milf, Tatsu, Cuttle, HP
/ra G2 :: Blue -> Yellow -> Red :: Gebuz, Araven, Mew, Tarrant, Essem, Puncehh
/ra G3 :: Yellow -> Red -> Blue :: Fen, Shen, Ani, Critten, Mean, Herc, Drae
param
(
[string] $EnvironmentName,
[string] $Version,
[string] $ProjectName,
[string] $OctopusApiKey,
[string] $OctopusServerUrl,
[string] $ReleaseNotes
)
@fenneh
fenneh / ExchangeMMC.bat
Created November 1, 2012 16:56
Exchange MMC & Windows 8 -Fix
@echo off
set __COMPAT_LAYER=RUNASINVOKER
set COMPLUS_Version=v2.0.50727
start C:\Progra~1\Microsoft\Exchan~1\V14\Bin\Exchan~1.msc
@fenneh
fenneh / DomainUser.Ps1
Created August 13, 2012 13:23
Get All users from AD
New-PSDrive -PSProvider ActiveDirectory -Name ADUser -Root "" -Server "dc1.lolololol.com"
pushd ADUser:
Get-ADUser -Filter * | Out-File "$env:temp\hihi.txt" -Encoding Default
popd