Skip to content

Instantly share code, notes, and snippets.

View manikmagar's full-sized avatar
🏠
Working from home

Manik Magar manikmagar

🏠
Working from home
View GitHub Profile
//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS com.konghq:unirest-java:3.4.00:standalone
//DEPS info.picocli:picocli:4.1.4
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@manikmagar
manikmagar / cloudSettings
Last active November 25, 2021 18:44
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-11-25T18:44:54.648Z","extensionVersion":"v3.4.3"}
cloudSettings
@manikmagar
manikmagar / Mule-config-and-dockerfile.txt
Created November 1, 2017 23:15
Hello Mule with Docker
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<flow name="mule-hello-worldFlow">
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd">
<spring:beans>
<spring:bean id="fileFilterWrapper" name="fileFilterWrapper" class="com.mms.mule.filefilters.FileFilterWrapper">
<spring:beans>
<spring:bean id="fileFilterWrapper" name="fileFilterWrapper" class="com.mms.mule.filefilters.FileFilterWrapper">
<spring:property name="ioFileFilter" ref="sizeFileFilter"/>
</spring:bean>
<spring:bean id="sizeFileFilter" name="sizeFileFilter" class="org.apache.commons.io.filefilter.SizeFileFilter">
<spring:constructor-arg index="0" value="10240"/>
<!-- accept smaller files only -->
<spring:constructor-arg index="1" value="false"/>
package com.mms.mule.filefilters;
import java.io.File;
import java.io.FileFilter;
import org.apache.commons.io.filefilter.IOFileFilter;
import org.mule.api.MuleMessage;
import org.mule.api.routing.filter.Filter;
import org.mule.api.routing.filter.ObjectFilter;
import org.slf4j.Logger;

Keybase proof

I hereby claim:

  • I am manikmagar on github.
  • I am manikmagar (https://keybase.io/manikmagar) on keybase.
  • I have a public key whose fingerprint is 84F2 FF14 69C1 CE37 1161 1024 89B3 3E4F 037E 6B2E

To claim this, I am signing this object:

@manikmagar
manikmagar / affirmation
Created August 3, 2016 16:18
MuleSoft Contributor Agreement Acceptance by Manik S Magar
I, Manik S Magar, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Wed Aug 03 2016 12:18:53 GMT-0400 (EDT)
@manikmagar
manikmagar / post-receive.sh
Created July 17, 2016 20:26
Shell script to bake the Static blog using JBake
#!/bin/bash
SITE_NAME=mysite.com
SITE_SYNC_HOME=~/gitsync/$SITE_NAME
JBAKE_TEMPLATE_REPO=https://github.com/manikmagar/clean-text-jbake-template.git
CONTENT_GIT_REPO=https://github.com/manikmagar/mm-blog-data.git
TMP_GIT_CLONE=$SITE_SYNC_HOME/repo
TMP_SITE_BACKUP=$SITE_SYNC_HOME/site/backup
PUBLIC_WWW=~/www/mysite
current_time=$(date "+%Y%m%d")