Skip to content

Instantly share code, notes, and snippets.

View anupammaiti's full-sized avatar
😎
Before software can be reusable it first has to be usable

Anupam Maiti anupammaiti

😎
Before software can be reusable it first has to be usable
View GitHub Profile
@anupammaiti
anupammaiti / local-stream-server-win10.md
Created October 28, 2023 22:19 — forked from unitycoder/local-stream-server-win10.md
Local RTMP Stream Server for Windows

https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmfp-server-using-monaserver.153/ (copied here as a backup)

This article is inspired of the great guide of How to set up your own private RTMP server using nginx. https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/

MonaServer is a tiny and scalable open source server which provide protocols RTMFP, RTMP, RTMPE, WebSocket and HTTP. Server applications are written in lua and clients just need to support one of these protocols.

The interest of MonaServer here is the RTFMP broadcast feature that avoid congestion (because it is a UDP protocol) unlike RTMP.

This guide will presents you an easy way to broadcast a video with OBS over RTMFP. Don't worry, you will not need to configure or write any code here :)

@anupammaiti
anupammaiti / aemTouchCheckboxDialog.xml
Created November 24, 2021 21:56 — forked from nateyolles/aemTouchCheckboxDialog.xml
AEM Touch UI component dialog checkboxes
<!-- Checked checkbox will result in a String property of "true" -->
<myCheckbox
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
text="My Checkbox"
name="./myCheckbox"
value="true"/>
<!-- Checked checkbox will result in a Boolean property of true-->
<myBooleanCheckbox
@anupammaiti
anupammaiti / gist:965fc51d5ab79dd9b5a017c29e265adf
Created November 24, 2020 20:37 — forked from jasoet/gist:3843797
Database Connection Singleton
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.secondstack.db;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
@anupammaiti
anupammaiti / .content.xml
Created November 18, 2020 22:59 — forked from briankasingli/.content.xml
AEM 6.4 RichText Editor - Enable all features, and disable inline full screen option; the inline fullscreen option causes too many problems.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Rich Text"
sling:resourceSuperType="core/wcm/components/text/v2/text"
componentGroup="General"/>
@anupammaiti
anupammaiti / ResourceToJSONServlet.java
Created June 24, 2020 22:05 — forked from nateyolles/ResourceToJSONServlet.java
Sample servlet which easily prints an AEM/Sling Resource/Node as JSON to the PrintWriter.
package com.nateyolles.aem;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import org.apache.sling.commons.json.JSONException;
import org.apache.sling.commons.json.jcr.JsonItemWriter;
@anupammaiti
anupammaiti / pdf_download.js
Created June 14, 2020 14:28 — forked from gpprojekt-marcin/pdf_download.js
jQuery.ajax() download pdf
$.ajax({
url: url,
data: data,
success: function (data) {
var blob = new Blob([data]);
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = "Dossier.pdf";
link.click();
}
@anupammaiti
anupammaiti / bitbucket-pipelines.yml
Created June 5, 2020 20:08 — forked from mcnamee/bitbucket-pipelines.yml
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables.
# 2. Commit this file to your repo
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initial GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you

Install Microsoft Office 2010 on Ubuntu

Requirements

We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.

So, if not installed, install them:

sudo apt-get install playonlinux samba winbind
Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
@anupammaiti
anupammaiti / curlPackageFilterRules.sh
Created May 6, 2019 21:34 — forked from nateyolles/curlPackageFilterRules.sh
AEM/CQ cURL: Adding include/exclude rules to package filters
# Adding include/exclude rules to CQ/AEM package filters through cURL.
# Through a simple search, you will find numerous lists of CQ/AEM cURL commands.
# However, I haven't seen an example of adding rules to package filters. The
# JSON "rules" key takes an array value. You can leave the array empty if you
# don't need to include any rules. The array is of JSON objects with a
# "modifier" key and value of "include" or "exclude", and a "pattern" key with
# your path or regular expression as the value.
# create package