Skip to content

Instantly share code, notes, and snippets.

View mb-14's full-sized avatar
🏠
Working from home

Miroojin Bakshi mb-14

🏠
Working from home
View GitHub Profile
@mb-14
mb-14 / SetTextProp.jsx
Created January 2, 2023 20:03 — forked from akamilkhan/SetTextProp.jsx
Set bold and set italic function for Photoshop JS Scripting. This can be used to control text properties in ranges, which is otherwise not supported by conventional PS JS scripting.
function setbold(IO, start, end, fontSize) {
//Sanity checking: is the active layer a text layer?
var activeLayer = app.activeDocument.activeLayer;
if (activeLayer.kind == LayerKind.TEXT) {
//More checking: does the text layer have content, and are start and end set to reasonable values?
if ((activeLayer.textItem.contents != "") && (start >= 0) && (end <= activeLayer.textItem.contents.length)) {
//The indentation that the Script Listerner gives you is weird, but it’s useful.
var idsetd = app.charIDToTypeID("setd");
var action = new ActionDescriptor();
var idnull = app.charIDToTypeID("null");
@mb-14
mb-14 / privacy_policy.md
Created October 5, 2018 09:25
Hoverdict Privacy Policy

Privacy Policy

Miroojin Bakshi built the Hoverdict app as a Free app. This SERVICE is provided by Miroojin BAkshi at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Hoverdict unless otherwise defined in this Privacy Policy.

@mb-14
mb-14 / basicauth.java
Last active July 14, 2017 09:03
Basic Authentication
String key = "YOUR_KEY";
String secret = "SECRET";
String auth = "Basic " + Base64.getEncoder().encodeToString((key + ":" + secret).getBytes("utf-8"));
// Header
// key: "Authorization"
// value: <auth>
@mb-14
mb-14 / Readme.md
Last active December 2, 2016 07:12
Intent flow

Razorpay ePOS intent flow

To launch Razorpay ePOS using the intent flow you need to launch an intent with the follwing URI data: rzp://epos/pay?product_name=tshirt&amount=100&contact=9876543210&description=tshirt&merchant_order_id=txn_123qwe

We have given a helper class called RazorpayInvoice which helps in creating this URI

/*
* Amount, product name and contact are mandatory fields
{
"batch": [
{
"action": "track",
"userId": "6nCwZymdNoVBHG",
"event": "Checkout init",
"timestamp": "2016-11-30T10:19:31Z",
"properties": {
"nanotime": "196841070803189",
"merchant_app_name": "RZP Checkout",
@mb-14
mb-14 / solution.java
Last active November 19, 2016 13:27
Hide loader onPageStart
int count = 0;
webview.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return false;
}
/**
* This is called usually in case of network errors
*/
@mb-14
mb-14 / magic.json
Last active November 7, 2016 07:34
magic_check
{enabled : false}
@mb-14
mb-14 / instructions.md
Last active October 11, 2016 14:33
react native fix
  1. Add this to your gradle dependencies: compile 'com.razorpay:checkout:1.0.1'
  2. Add the RazorpayModule.java native module to your project. RazorpayCheckout.js exposes the module.
  3. Go through the sample js code to see how to use the module
{
"basics": {
"name": "Miroojin Bakshi",
"label": "Software Developer",
"url": "https://mb-14.github.io/",
"picture": "",
"email": "mbakshi1094@gmail.com",
"summary": "I'm a software engineer who loves exploring new technologies and engineering concepts. I have development experience in building data platforms, backend services, websites and mobile apps",
"location": {
"postalCode": "411007",
@mb-14
mb-14 / newsfeed.json
Last active December 23, 2015 05:59
newsfeed
[
"<a target=\"_blank\" href=\"http:\/\/people.iiti.ac.in\/~studentgym\/projects.html\">Gymkhana projects<\/a>" ,
"<a target=\"_blank\" href=\"http:\/\/hostel.iiti.ac.in\">Hostel Website updated<\/a>" ,
"<a target=\"_blank\" href=\"https:\/\/docs.google.com\/file\/d\/0B2RlMfbQS070Q1BjNTFZQnZ1TDA\/edit?hl=en-GB&forcehl=1\">Information for prospective students<\/a>"
]