Skip to content

Instantly share code, notes, and snippets.

View reflexdemon's full-sized avatar

Venkateswara Venkatraman Prasanna reflexdemon

View GitHub Profile
@reflexdemon
reflexdemon / concourse-viewer.user.js
Last active September 20, 2023 13:25
Fixes concouse-viewer where it has too much tabs
// ==UserScript==
// @name Concourse Viewer
// @version 1
// @include https://concourse*
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_setClipboard
// @grant GM_addStyle
// ==/UserScript==
@reflexdemon
reflexdemon / commit-message.user.js
Created August 25, 2023 20:42
This is a GreeseMonkey script for enabling commit messages
// ==UserScript==
// @name Copy Commit Message
// @version 1
// @include https://jira*
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant GM_setClipboard
// @grant GM_addStyle
// ==/UserScript==
@reflexdemon
reflexdemon / auto-boxing.md
Last active September 15, 2021 12:30
Auto boxing on Console and Terminal

Introduction

If at any given time you wanted to print something on terminal or your console and show box around it, have you tried playing with echo/printf command? With neatly typing each characters like below,

echo "┌────────────────┐";
echo "│ Cool New title │";
echo "└────────────────┘";
@reflexdemon
reflexdemon / MysteryNumber.md
Last active February 3, 2022 12:11
This is a java program to solve a mystry number using java streams

Intresting Problem

I was suprised to see a puzzle given to an elementry school kid. Let me put the puzzle to you and I was planning to solve it manually and was lazy to do the math. Then I got an Idea to solving through Java Program. My cup of Coffee :).

Puzzle

What is the mystery number?

  1. It is greater then 1 lakh but less then 10 lakhs
  2. It's an even number

Print Request/Response for Node JS

This is a handy tool to print the node request library API response on console so that we can print it for debugging and also sending infomation to the API teams. I always try to print it out from the application to triage the issue with API teams.

function printResponse(response) {
  console.log(`Request:`);
  console.log(`${response.request.method} ${response.request.href}`)
 console.log(`Headers: ${JSON.stringify(response.request.headers)}`)
@reflexdemon
reflexdemon / Optional Notes.md
Last active March 3, 2020 17:43
Tips for using Java Optional

Tips for using Optional effectively

Tip #1

Dont do,

Optional<DataType> instance = null;

do it this way,

Optional instance = Optional.empty();
@reflexdemon
reflexdemon / reflex+terminal.md
Last active September 28, 2020 10:03
Make the terminal beautiful using Zsh on Linux Mint

Reflex Terminal

Most people who as seen my terminal always asked what I do to make it look fancy. The secret is very simple,I just use some of the cool stuff that is available on my platform,

On Debian. bases systems you can use the following command and get your cool stuff,

$ sudo apt-get install jq, httpie, figlet
@reflexdemon
reflexdemon / SleepSwitch.java
Last active April 20, 2022 12:52
Robo Sleep
import java.awt.*;
import java.util.*;
/**
* Robo Sleep
*/
public class SleepSwitch {
public static void main(String[] args) throws Exception {
@reflexdemon
reflexdemon / Description.md
Last active April 27, 2024 12:07
Crack the Code

Solution Overview

Problem Statement

There are 5 hints provided to solve the puzzle and we understand that the answer is going to be a 3 digit number. There are a few assumptions that we can make.

  1. The solution will not have any digits repeat
  2. The length of solution is 3 digits

Let us represent the problem input using multi-dimension string array as problemData.

package app.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.ProviderManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;