Skip to content

Instantly share code, notes, and snippets.


fen fenneh

  • London
View GitHub Profile
fenneh /
Created Feb 14, 2018 — forked from junxy/
Logstash 2.1.x config for log4net logs.
<!- .... ->
    <appender name="RollingLogFileAppenderLogstash" type="log4net.Appender.RollingFileAppender">
      <encoding value="utf-8" />
      <!--该目录必需有 IIS用户 写权限-->
      <file value="X:/var/log/[app_name]/logfile.log" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
View gist:baa4e3ca02d61985143247b051f463f9
fenneh /
Created Jun 7, 2017 — forked from dongjinleekr/
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/ --topic benchmark-3-3-none \
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1
View benchmark-commands.txt
bin/ --zookeeper --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/ --zookeeper --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/ test7 50000000 100 -1 acks=1 buffer.memory=67108864 batch.size=8196
fenneh / Log-EphemeralStats.ps1
Created Oct 27, 2016
View Log-EphemeralStats.ps1
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.
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
.Parameter CollectionInterval
This must be an integer in seconds. This is how often you
View gist:d818e38ad71d8a1e8d37

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

fenneh / Update-StepTemplatesOnDeploymentProcesses.ps1
Last active Aug 27, 2015 — forked from Dalmirog-zz/Update-StepTemplatesOnDeploymentProcesses.ps1
Update-StepTemplatesOnDeploymentProcesses (nice name, i know)
View Update-StepTemplatesOnDeploymentProcesses.ps1
Updates the Step Templates used on Deployment Processes to the latest versions
Step templates can be updated from the library on Octopus, but that doesnt mean that the Deployment processes using that template will start using the latest version right away. Normally, the user would have to update the step template on each deployment process manually. This script takes care of that.
Update-StepTemplatesOnDeploymentProcesses -ActionTemplateID "ActionTemplates-3" -OctopusURI "http://localhost" -APIKey "API-RLMWLZBPMX5DRPLCRNZETFS4HA"
Update-StepTemplatesOnDeploymentProcesses -AllActionTemplates -OctopusURI "" -APIKey "API-TSET42BPMX5DRPLCRNZETFS4HA"
View gist:8aaaefc48f6a42142b48
# Assumptions
# 1. If you have a Octopus release deployed, say, there is a git
# tag set for that commit in GitHub that is "v1.0.0.73".
# 2. You have TeamCity label each successful build in GitHub with the format
# "v{build number}. Sidenote: it appears that TeamCity only labels the
# default branch, but not feature branches.
View msbuild-aliases.ps1
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0").MSBuildToolsPath -ChildPath "MSBuild.exe")
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5").MSBuildToolsPath -ChildPath "MSBuild.exe")
Set-Alias MSBuild (Join-Path -Path (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0").MSBuildToolsPath -ChildPath "MSBuild.exe")
View OctoDeploy.ps1
[string] $EnvironmentName,
[string] $Version,
[string] $ProjectName,
[string] $OctopusApiKey,
[string] $OctopusServerUrl,
[string] $ReleaseNotes
You can’t perform that action at this time.