Skip to content

Instantly share code, notes, and snippets.

Riwut Libinuko cakriwut

  • ItsZap Inc.
  • Singapore
Block or report user

Report or block cakriwut

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
View Wiki Search Demo.POWERPOINT.yaml
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) => {
View Simple Currency Converter.EXCEL.yaml
name: Simple Currency Converter
description: Simple currency converter
host: EXCEL
api_set: {}
script:
content: |
declare var moment: any;
$("#convert").click(() => tryCatch(convert));
$("#setup").click(() => tryCatch(setupSample));
@cakriwut
cakriwut / ScriptLab Search Wiki.POWERPOINT.yaml
Last active Nov 10, 2019
Search Wikipedia based on the selected text.
View ScriptLab Search Wiki.POWERPOINT.yaml
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 Oct 23, 2016
Configure IIS ARR in Azure Web Site
View applicationHost.xdt
<?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 Oct 23, 2016
Custom HTTP Module to sanitize SharePoint response header
View CustomHttpHeaderModule.cs
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 Oct 22, 2016
Complete Reverse proxy rule for SharePoint
View web.config
<configuration>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="CustomHttpModule" type="Custom.ServerModules.CustomHttpHeaderModule" />
</modules>
<httpProtocol>
@cakriwut
cakriwut / web.config
Created Oct 22, 2016
Add custom module to process response pipeline
View web.config
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="CustomHttpModule" type="Custom.ServerModules.CustomHttpHeaderModule" />
</modules>
</system.webServer>
</configuration>
@cakriwut
cakriwut / web.config
Created Oct 22, 2016
Modify response header
View web.config
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<remove name="X-Powered-By" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol>
</system.webServer>
@cakriwut
cakriwut / web.config
Last active Oct 22, 2016
IIS Reverse Proxy Sample Rule
View web.config
<configuration>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxy" stopProcessing="true">
<match url=".*" />
@cakriwut
cakriwut / DetikRSS.ps1
Created Oct 5, 2016
How to download URL news link from detik.com using RSS feed
View DetikRSS.ps1
# Defines file capture location
$fileCapture = "C:\temp\detik.txt"
# List of target RSS - you can add more
$targetRSS = "detikcom_nasional", "detikcom_internasional", "detikcom_bbc","detikcom_lapsus","detikcom_wawancara"," detikcom_prokontra"
$targetRSS |% {
$url = "http://rss.detik.com/index.php/" + $_
$targetXml = "C:\temp\" + $_ + ".xml"
Invoke-WebRequest -Uri $url -OutFile $targetXml -ErrorAction Stop
You can’t perform that action at this time.