Skip to content

Instantly share code, notes, and snippets.

View sunil-bagde's full-sized avatar
🎨
Fullstack Developer [NodeJS,ReactJS]

Sunil Bagde sunil-bagde

🎨
Fullstack Developer [NodeJS,ReactJS]
View GitHub Profile
@sunil-bagde
sunil-bagde / p2
Created March 13, 2024 10:51 — forked from sunil-bagde-1/p2
{"name":"p2","settings":"{\"settings\":\"{\\n /**\\n * Better Defaults\\n **/\\n \\\"editor.copyWithSyntaxHighlighting\\\": false,\\n \\\"diffEditor.ignoreTrimWhitespace\\\": false,\\n \\\"editor.emptySelectionClipboard\\\": false,\\n \\\"workbench.editor.enablePreview\\\": false,\\n \\\"window.newWindowDimensions\\\": \\\"inherit\\\",\\n \\\"editor.multiCursorModifier\\\": \\\"ctrlCmd\\\",\\n \\\"files.trimTrailingWhitespace\\\": true,\\n \\\"diffEditor.renderSideBySide\\\": false,\\n \\\"editor.snippetSuggestions\\\": \\\"none\\\",\\n \\\"editor.detectIndentation\\\": false,\\n \\\"files.insertFinalNewline\\\": true,\\n \\\"files.trimFinalNewlines\\\": true,\\n\\n /**\\n * Hide Everything\\n */\\n //\\\"workbench.activityBar.location\\\": \\\"hidden\\\",\\n \\\"workbench.sideBar.location\\\": \\\"right\\\", //here\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"editor.lineNumbers\\\": \\\"off\\\",\\n \\\"editor.guides.indentation\\\": false,\\n\\n /**\\n * Silence The Noise\\n
@sunil-bagde
sunil-bagde / base-converter.js
Created October 30, 2021 13:43 — forked from kopiro/base-converter.js
Convert any number from base X to base X in Javascript
function base_converter(nbasefrom, basefrom, baseto) {
var SYMBOLS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (basefrom<=0 || basefrom>SYMBOLS.length || baseto<=0 || baseto>SYMBOLS.length) {
console.log("Base unallowed");
return null;
}
var i, nbaseten=0;
if (basefrom!=10) {
var sizenbasefrom = nbasefrom.length;
for (i=0; i<sizenbasefrom; i++) {
@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 {
@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"
import PopperTooltip from 'tooltip.js';
new Vue({
el: '#app',
mounted() {
document.querySelectorAll('[data-tooltip]').forEach(elem => {
new PopperTooltip(elem, {
placement: elem.dataset.tooltipPlacement || 'top',
title: elem.dataset.tooltip
<?php
namespace App\Core\Concerns;
trait AuthorizesVue
{
/**
* Accessor for can attribute.
*/
public function getCanAttribute()
<?php
namespace Supawdog\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\ProcessUtils;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Process\PhpExecutableFinder;
class WebpackCommand extends Command
@sunil-bagde
sunil-bagde / MyComponent.js
Created March 11, 2018 11:42 — forked from joecritch/MyComponent.js
Passing specific props in React / JSX
class MyComponent extends React.Component {
render() {
const {location, todos, users} = this.props;
//
// ... do things with your variables!
//
return (
<MyChild {...{location, todos, user}} />
// equivalent to:
// <MyChild location={location} todos={todos} user={user} />