Skip to content

Instantly share code, notes, and snippets.

View nibro7778's full-sized avatar
🎯
Focusing

Niraj Trivedi nibro7778

🎯
Focusing
View GitHub Profile
@nibro7778
nibro7778 / git_custom_command_win.md
Created April 4, 2018 12:25 — forked from lucijafrkovic/git_custom_command_win.md
Add custom git command (Windows)

Creating a custom git command in Windows

  1. create a cmd/bat file with the command. E.g. retag.cmd, save it in C:\git-scripts for example

  2. add your git commands to the file. For example, this set of commands deletes the specified tag from your current branch both locally and remotely, then tags it with the same tag and pushes the change remotely

    git tag -d %1

    git push origin :refs/tags/%1

@nibro7778
nibro7778 / MySQLConnectionTest.java
Created October 1, 2018 03:57
Test MySQL connection using JDBC
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mysqlconnectiontest;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
@nibro7778
nibro7778 / ReactComponentExample.js
Last active February 23, 2019 05:35
Sample React class and function component example which increment value on button click
class Button extends React.Component {
render() {
return (
<button onClick={() => this.props.onClickFunction(this.props.incrementValue)}>
+{this.props.incrementValue}
</button>
);
}
}
@nibro7778
nibro7778 / WorkingWithDataReact.js
Last active February 23, 2019 05:34
Sample application which fetch github user details and show its on UI
const Card = (props) => {
return (
<div>
<img width="75" src={props.avatar_url} />
<div style={{ display: 'inline-block', marginLeft: 10 }}>
<div style={{ fontSize: '1.25em', fontWeight: 'bold' }}>{props.name}</div>
<div>{props.company}</div>
</div>
</div>
);