Skip to content

Instantly share code, notes, and snippets.

View sunil-bagde's full-sized avatar

Sunil Bagde sunil-bagde

View GitHub Profile
@sunil-bagde
sunil-bagde / tiffMerged.js
Last active September 22, 2021 19:08
Tiff merge
// https://stackoverflow.com/questions/17062219/pass-multiple-parameters-to-processbuilder-with-a-space
// https://stackoverflow.com/questions/15384879/imagemagick-using-more-than-2gb-of-memory-to-convert-pdf-files
// https://www.imagemagick.org/script/command-line-options.php#limit
// Set '-limit memory 0 -limit map 0'. If that fails, you'll need a larger instance of a Amazon server to run ImageMagick.
// https://legacy.imagemagick.org/discourse-server/viewtopic.php?t=23090
// https://github.com/imagemagick/imagemagick/issues/327
/* convert -background '#dfe1ff' -pointsize 40 -fill blue -gravity south \
@sunil-bagde
sunil-bagde / SSLCertificateValidation.java
Created September 8, 2021 21:46 — forked from mariuszprzydatek/SSLCertificateValidation.java
mariuszprzydatek.com blog example on how to disable SSL certificate validation in Java
package my.hydepark.ssl;
import javax.net.ssl.*;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
public class SSLCertificateValidation {
public static void disable() {
try {
{
"added_words":
[
"jsoniary",
"const"
],
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "phase",
"close_windows_when_empty": true,
import {useState} from 'react';
export const useInput = initialValue => {
const [value, onChange] = useState(initialValue);
return {
value,
onChange(e) {
onChange(e.target.value);
},
import React, { useState, useCallback, useMemo } from "react";
import ReactDOM from "react-dom";
import { Input, Button } from "antd";
import { diffLines, formatLines } from "unidiff";
import { parseDiff, Diff, Hunk } from "react-diff-view";
import { useInput } from "./hooks";
import "antd/dist/antd.min.css";
import "react-diff-view/style/index.css";
import tokenize from "./tokenize";
const newS = {
codeFold: { "background-color": "rgb(241, 248, 255)", height: "40px", "font - size": "14px", "font-weight": 700, },
codeFoldContent: { color: "rgb(33, 37, 41)", },
codeFoldGutter: { 'background-color': 'rgb(219, 237, 255)', },
content: {width: "100%", },
contentText: { color: "rgb(33, 37, 41)", },
diffAdded: { background: "rgb(230, 255, 237)", color: "rgb(36, 41, 46)", },
diffContainer: { width: "100%", background: "rgb(255, 255, 255)", 'border-collapse': "collapse", },
diffRemoved: { background: "rgb(255, 238, 240)", color: "rgb(36, 41, 46)", },
emptyLine: { "background-color": "rgb(250, 251, 252)", },
@sunil-bagde
sunil-bagde / .bash_profile
Created June 29, 2019 12:27 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"