Skip to content

Instantly share code, notes, and snippets.

View SanthoshBabuMR's full-sized avatar
💫
Give me 6 hours to chop down a tree & I'll spend the first 4 sharpening the axe.

Santhosh Babu SanthoshBabuMR

💫
Give me 6 hours to chop down a tree & I'll spend the first 4 sharpening the axe.
View GitHub Profile
@SanthoshBabuMR
SanthoshBabuMR / postgres-cheatsheet.sql
Last active October 13, 2020 03:41
postgres cheatsheet
-- find tables
SELECT *
FROM information_schema.tables
WHERE table_schema = 'public'
and table_name like '%pattern%'
ORDER BY table_type, table_name;
-- DESC table
SELECT
table_name,
@SanthoshBabuMR
SanthoshBabuMR / build.gradle
Last active October 4, 2020 04:04
build.gradle
apply plugin: 'java'
version = 0.1
sourceCompatibility = 1.8
// location to download the depenedencies
repositories {
mavenCentral()
}
@SanthoshBabuMR
SanthoshBabuMR / gradle-location.md
Created October 4, 2020 03:50
gradle location

Gradle Wrapper

  • project-root
    • gradle
      • gradle-wrapper.jar (download, unpack gradle specified in properties file)
      • gradle-wrapper.properties (gradle home path, gradle version to download)
    • gradlew
    • gradlew.bat

Gradle location

  • ~/.gradle/wrapper/dists (gradle installation by wrapper)
@SanthoshBabuMR
SanthoshBabuMR / java-project-strucuture.md
Last active October 4, 2020 03:47
java project structure

Java (Maven) Project layout

  • src
    • main
      • java
      • resources
    • test
      • java
      • resources

Java (Maven) Project layout:: Web Application

@SanthoshBabuMR
SanthoshBabuMR / revert-merged-commit-on-develop.md
Last active September 1, 2020 15:15
Revert Merged Commit on develop
@SanthoshBabuMR
SanthoshBabuMR / postgresql.sql
Last active August 18, 2020 04:29
postgresql cheatsheet
# Connect to psql
psql -d <db_name>
# show current DB
/c
# switch DB
/c <db_name>
# create DB
@SanthoshBabuMR
SanthoshBabuMR / hide_irrelevant_content_in_a_web_page.css
Last active July 12, 2020 05:59
hide irrelevant content in a web page
/*
* site: https://www.oxfordlearnersdictionaries.com/
*/
#ad_btmslot_a, iframe {
visibility: hidden;
}
/*
* site: https://learning.oreilly.com/
@SanthoshBabuMR
SanthoshBabuMR / oracle_advance_sql_code_samples.sql
Created June 3, 2020 01:33
Code Samples from: Advanced SQL : SQL Expert Certification Preparation
--Analysing user_objects and all_objects views
select * from user_objects;
select * from cat;
select * from user_catalog;
select * from all_objects;
select * from dba_objects;
--Searching in tables (user_tables)
select * from user_tables;
select * from all_tables;
select * from dba_tables;
@SanthoshBabuMR
SanthoshBabuMR / find_str_in_sent_2.js
Last active June 2, 2020 00:12
Find 'aeiou' in sentence
function smallestSubStr(sentence, str) {
if(!sentence || !str) { return null; }
let beginCharacter = str[0].toLowerCase();
let probableMatches = [];
let smallestSubStrMap = {
len: Number.MAX_SAFE_INTEGER,
text: null
};