Skip to content

Instantly share code, notes, and snippets.

🔥
Hi

fen fenneh

🔥
Hi
  • 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
fenneh / HAProxyListenExample
Created Jun 11, 2012
HAProxy HTTP Check with Head & User Agent type
View HAProxyListenExample
listen justFenWEB
bind 192.168.100.100:80
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:\ www.justfen.com\r\nUser-Agent:\ HAProxy01 ## Used for checking HTTP health of web server
rspidel ^Set-cookie:\ IP= ## Will hide internal IP
server APP01 APP01.justfen.com:80 check
server APP03 APP03.justfen.com:80 check
@fenneh
fenneh / Logstash-log4net-README.md
Created Feb 14, 2018 — forked from junxy/Logstash-log4net-README.md
Logstash 2.1.x config for log4net logs.
View Logstash-log4net-README.md
<!- .... ->
<log4net>    
    <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
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 http://technet.microsoft.com/en-us/library/cc753194(v=ws.10).aspx
Rem http://www.justfen.com/post/24560405011/syncing-sublime-text-2-with-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
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
duLuEgqijsj1LusQOnrPQu4tkjLgfsf1PqQiRIsvPOEfLQsrMfLQsClji7sQs1VusQKHHeogszzuINHennkvUMsITjvX3KiACiv4CkjzDsKsmpjsj5EsvkTpLKkCqkjlKs5HsqnrjuUOsQ2isvFKsvXiLQKtQewPeP4LsvkMPej3ucStP0pPKAOsihLsvP0sLq1tvnvbxLsv2QePuFvjPySkjvkoRssvVLsvPYCPuvDxkvLQ2l5VsLbdQomvwms6XGmzrDzuBwi(SqnAjQtRy1sKQxlry2u1TvQDd8BkgUuCCkvL0YL0ZrmDORlY2vI(UskJxQQZlKwpsLEVssLs3xjPs1(bLfnf0DkiuNOBP3TR3PuFRN1ZkOhxnRPxQ1PpO336irimQwkPqpQ1rIqyuT0wHcDheol5qDIJ5AbMmR2crJcDc7JuKzaOEXxyF6vqVmpXLr12df6EJlRGo68maTOG(o5XrbHc1rNNbOc67KhhfekupprImqjpgvb9DYJJccfQxnEwb9DYJJccfQ3SSbDEgGkOVtECuqOq9ioiCmaf03jpokiuOE1bXkOVtECuqOq9eH7G8ocrufQx54XacrBy9CuGBpqXvtQrN734azolB6twpyHcyWlem4bZMkm4MiWGFxnMRoIUlNhCmaNVdRtCmxjkiupv96LrSHuAz11QR1CXMEFmRUkTJgPeuWRQqRUrppKspbGWzjR78EDqAhQtCmxjQLM(Atgll6xHs6Gokjf90JfARYUsUkkStrkKDuiuhsb1stbDK7J0O3aWp0LvRf70Dq4SKd1joMRfyYSAlenk0Dq4yaef0jORIkOVzcXfZ66BMqCXChgTH1VvRE9SPdkrqZwu1ZMUntiUywufQpGbvqpB6Gse0SfvHc1rUpAHEda1TccAYmaDEyWlQYKjZaOO6oWSD4yakOtqxfvqVPYeg1j(jZ1jUmkupYagszf0BQmHrDIFYmvdIMTqH6yDIJ5Qc6Kg27xK1Tqjnk7Hs9CQ6WXa0Ttpr4osd79T
@fenneh
fenneh / consumer.sh
Created Jun 7, 2017 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
View consumer.sh
## 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
View benchmark-commands.txt
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 Oct 27, 2016
Log-EphemeralStats.ps1
View 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
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.