Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cakriwut's full-sized avatar

Riwut Libinuko cakriwut

  • ItsZap Inc.
  • Singapore
View GitHub Profile
@cakriwut
cakriwut / router.cfg
Created July 2, 2023 12:49 — forked from marfillaster/router.cfg
MikroTik RouterOS v7 dual DHCP WAN recursive failover w/ PCC load-balancing; and recursive ECMP
# feb/11/2022 11:00:55 by RouterOS 7.2rc3
# software id = 9QK9-C798
#
# model = RB5009UG+S+
# serial number = XXXXXXXXXX
/ip settings set allow-fast-path=no
/interface bridge add admin-mac=FF:FF:FF:FF:FF:FF auto-mac=no name=bridge
@cakriwut
cakriwut / router.cfg
Created July 2, 2023 03:04 — forked from FranMercedesG/router.cfg
Mikrotik dual dhcp wan recursive failover w/ pcc load balancing
/interface bridge add auto-mac=no name=bridge
/interface bridge port add bridge=bridge interface=ether1
/interface bridge port add bridge=bridge interface=ether2
/interface bridge port add bridge=bridge interface=ether3
/interface list add name=WAN
/interface list add name=LAN
<#
.SYNOPSIS
Virtual Desktop Optimalization Tool (VDOT)
.DESCRIPTION
Download the Virtual Desktop Optimalization Tool (VDOT), creates a folder called optimize and runs VDOT tool.
The VDOT tool determines OS version at run-time
.NOTES
Version: 1.0
Author: Ivo Beerens
info@ivobeerens.nl
# Requires $env:AdminUser $env:AdminPassword
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Enable-WSManCredSSP -Role Server -Force
Enable-WSManCredSSP -Role Client -DelegateComputer * -Force
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -Name AllowFreshCredentialsWhenNTLMOnly -Force
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name 1 -Value * -PropertyType String
$user = "$($env:computername)\$($env:AdminUser)"
name: Wiki Search Demo
description: Wiki Search Demo
host: POWERPOINT
api_set: {}
script:
content: |
$("#run").click(run);
function run() {
Office.context.document.getSelectedDataAsync(Office.CoercionType.Text, (asyncResult) => {
@cakriwut
cakriwut / Simple Currency Converter.EXCEL.yaml
Last active March 2, 2020 13:04
Simple currency converter
name: Simple Currency Converter
description: Simple currency converter
host: EXCEL
api_set: {}
script:
content: >
/*
* Copyright (c) Riwut Libinuko. All rights reserved. Licensed under the MIT license.
*/
@cakriwut
cakriwut / ScriptLab Search Wiki.POWERPOINT.yaml
Last active November 10, 2019 10:18
Search Wikipedia based on the selected text.
name: ScriptLab Search Wiki
description: Search Wikipedia based on the selected text.
host: POWERPOINT
api_set: {}
script:
content: |
declare var moment: any;
$("#search").click(run);
async function run() {
@cakriwut
cakriwut / applicationHost.xdt
Created October 23, 2016 13:17
Configure IIS ARR in Azure Web Site
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<proxy xdt:Transform="InsertIfMissing" enabled="true" preserveHostHeader="false"
reverseRewriteHostInResponseHeaders="false" arrResponseHeader="false"/>
<rewrite>
<allowedServerVariables>
<add name="HTTP_ACCEPT_ENCODING" xdt:Transform="Insert" />
<add name="HTTP_X_ACCEPT_ENCODING" xdt:Transform="Insert" />
<add name="HTTP_X_ORIGINAL_HOST" xdt:Transform="Insert" />
@cakriwut
cakriwut / CustomHttpHeaderModule.cs
Created October 23, 2016 11:52
Custom HTTP Module to sanitize SharePoint response header
using System;
using System.Text;
using System.Web;
namespace Custom.ServerModules
{
public class CustomHttpHeaderModule : IHttpModule
{
public void Init(HttpApplication context)
{
@cakriwut
cakriwut / web.config
Created October 22, 2016 15:46
Complete Reverse proxy rule for SharePoint
<configuration>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="CustomHttpModule" type="Custom.ServerModules.CustomHttpHeaderModule" />
</modules>
<httpProtocol>