Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View fenneh's full-sized avatar
🔥
Hi

fen fenneh

🔥
Hi
View GitHub Profile
@fenneh
fenneh / PSBypass.bat
Created May 28, 2012 11:15
Run a powershell script from UNC path
Powershell.exe -ExecutionPolicy Bypass -file \\my.domain.share\netlogon\Scripts\InstallPonies.ps1
@fenneh
fenneh / CreateVM.ps1
Created May 30, 2012 14:00
Script to Automagically create VMs
param (
[string]$vmName = (Read-Host "Provide VM Name"),
[string]$vmFlavour = (Read-Host "What flavour of server do you want? Web/Gravis/Vanilla"),
[string]$vmSize = (Read-Host "Instance Size? Small/Medium/Large")
)
# Import Configuration
. (Join-Path -Path (Split-Path -parent $MyInvocation.MyCommand.Definition) -ChildPath "configuration.ps1")
# Load VMware Module
if ((Get-PSSnapin | Where-Object { $_.Name -eq "VMware.VimAutomation.Core" }) -eq $null) { Add-PSSnapin VMware.VimAutomation.Core }
{
"order": 1,
"index_patterns": [
"apm-7.2.0*"
],
"settings": {
"index": {
"codec": "best_compression",
"mapping": {
"total_fields": {
@fenneh
fenneh / elastic-template.json
Last active October 16, 2020 17:18
elastic-template
{
"_doc": {
"_meta": {
"beat": "apm",
"version": "7.2.0"
},
"_source": {
"enabled": true
},
"dynamic_templates": [
@fenneh
fenneh / suckadick.json
Created December 27, 2013 21:58
Bypass Virgin Blocks using HTTP Referrer
[{"id":"defaultAction","val":"dummy","type":"normal","filter":"","is3rd":true},{"id":1388180579896,"val":"http://piratebay*","type":"specific","filter":"assets.virginmedia.com","isregexp":false,"isfrom":true,"isto":true,"is3rd":true},{"id":1388180601615,"val":"http://1337x.org","type":"specific","filter":"assets.virginmedia.com","isregexp":false,"isto":true},{"id":1388180702550,"val":"http://abmp3.com","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180723517,"val":"http://beemp3s.org","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180844591,"val":"http://bitsnoop.com","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180854934,"val":"http://bomb-mp3.com","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180861637,"val":"http://emp3world.cc","type":"specific","filter":"assets.virginmedia.com","isregexp":false},{"id":1388180866825,"val":"http://extratorrent.cc","type":"specific","filter"
@fenneh
fenneh / HAProxyListenExample
Created June 11, 2012 11:41
HAProxy HTTP Check with Head & User Agent type
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 February 14, 2018 14:22 — forked from junxy/Logstash-log4net-README.md
Logstash 2.1.x config for log4net logs.
<!- .... ->
<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 June 6, 2012 21:04
Syncing Sublime Text 2 Settings with Google Drive
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\"
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
duLuEgqijsj1LusQOnrPQu4tkjLgfsf1PqQiRIsvPOEfLQsrMfLQsClji7sQs1VusQKHHeogszzuINHennkvUMsITjvX3KiACiv4CkjzDsKsmpjsj5EsvkTpLKkCqkjlKs5HsqnrjuUOsQ2isvFKsvXiLQKtQewPeP4LsvkMPej3ucStP0pPKAOsihLsvP0sLq1tvnvbxLsv2QePuFvjPySkjvkoRssvVLsvPYCPuvDxkvLQ2l5VsLbdQomvwms6XGmzrDzuBwi(SqnAjQtRy1sKQxlry2u1TvQDd8BkgUuCCkvL0YL0ZrmDORlY2vI(UskJxQQZlKwpsLEVssLs3xjPs1(bLfnf0DkiuNOBP3TR3PuFRN1ZkOhxnRPxQ1PpO336irimQwkPqpQ1rIqyuT0wHcDheol5qDIJ5AbMmR2crJcDc7JuKzaOEXxyF6vqVmpXLr12df6EJlRGo68maTOG(o5XrbHc1rNNbOc67KhhfekupprImqjpgvb9DYJJccfQxnEwb9DYJJccfQ3SSbDEgGkOVtECuqOq9ioiCmaf03jpokiuOE1bXkOVtECuqOq9eH7G8ocrufQx54XacrBy9CuGBpqXvtQrN734azolB6twpyHcyWlem4bZMkm4MiWGFxnMRoIUlNhCmaNVdRtCmxjkiupv96LrSHuAz11QR1CXMEFmRUkTJgPeuWRQqRUrppKspbGWzjR78EDqAhQtCmxjQLM(Atgll6xHs6Gokjf90JfARYUsUkkStrkKDuiuhsb1stbDK7J0O3aWp0LvRf70Dq4SKd1joMRfyYSAlenk0Dq4yaef0jORIkOVzcXfZ66BMqCXChgTH1VvRE9SPdkrqZwu1ZMUntiUywufQpGbvqpB6Gse0SfvHc1rUpAHEda1TccAYmaDEyWlQYKjZaOO6oWSD4yakOtqxfvqVPYeg1j(jZ1jUmkupYagszf0BQmHrDIFYmvdIMTqH6yDIJ5Qc6Kg27xK1Tqjnk7Hs9CQ6WXa0Ttpr4osd79T