Skip to content

Instantly share code, notes, and snippets.


fen fenneh

  • London
Block or report user

Report or block fenneh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fenneh / HAProxyListenExample
Created Jun 11, 2012
HAProxy HTTP Check with Head & User Agent type
View HAProxyListenExample
listen justFenWEB
mode tcp ## Drops from Layer 7 to Layer 4 routing as defined in defaults
option tcplog
balance source ## To maintain sessions
option httpchk HEAD / HTTP/1.0\r\nHost:\\r\nUser-Agent:\ HAProxy01 ## Used for checking HTTP health of web server
rspidel ^Set-cookie:\ IP= ## Will hide internal IP
server APP01 check
server APP03 check
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" />
fenneh / SubSyncgDrive.bat
Created Jun 6, 2012
Syncing Sublime Text 2 Settings with Google Drive
View SubSyncgDrive.bat
Rem Just an example of how to sync your Sublime Text 2 settings with googledrive. Only works on Windows Vista+
Rem Uses mklink to create links to your google drive
cd %APPDATA%\Sublime Text 2\
mklink /d "Backup" "C:\Users\fen\Google Drive\Sublime\Backup"
mklink /d "Installed Packages" "C:\Users\fen\Google Drive\Sublime\Installed Packages"
mklink /d "Packages" "C:\Users\fen\Google Drive\Sublime\Packages"
mklink /d "Pristine Packages" "C:\Users\fen\Google Drive\Sublime\Pristine Packages"
mklink /d "Settings" "C:\Users\fen\Google Drive\Sublime\Settings\"
fenneh / PSBypass.bat
Created May 28, 2012
Run a powershell script from UNC path
View PSBypass.bat
Powershell.exe -ExecutionPolicy Bypass -file \\my.domain.share\netlogon\Scripts\InstallPonies.ps1
View SecureSSL.ps1
function Set-SSLSecurityProtocols {
$protopath = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols"
& reg.exe add "$protopath\PCT 1.0\Server" /v Enabled /t REG_DWORD /d 00000000 /f
& reg.exe add "$protopath\SSL 2.0\Server" /v Enabled /t REG_DWORD /d 00000000 /f
& reg.exe add "$protopath\SSL 3.0\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.0\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.1\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.1\Server" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
& reg.exe add "$protopath\TLS 1.2\Server" /v Enabled /t REG_DWORD /d 00000001 /f
& reg.exe add "$protopath\TLS 1.2\Server" /v DisabledByDefault /t REG_DWORD /d 00000000 /f
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:

You can’t perform that action at this time.