Skip to content

Instantly share code, notes, and snippets.

@tvajjala
tvajjala / Git.java
Created November 8, 2023 16:40 — forked from Crydust/Git.java
run git commands from java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
class CreditCardValidatorTest extends Specification{
def "Testing CreditCardValidator.isValid() method "(){
given: "CreditCardValidator instance"
CreditCardValidator cardValidator=new CreditCardValidator()
when: "Invoke isValid($cardNumber) method"
Header Metadata
// Header Metadata
var hm = require('header-metadata') ;
//setting metadata
hm.current.set('Authentication','Bearer kjeklkdslfkdsfld');
var allHeaders=hm.current.headers;
console.info(allHeaders);
// changing response header
hm.response.set('Content-Type','application/xml');
console.info('Response Headers :'+ JSON.stringify(hm.response.headers));
var urlopen = require('urlopen');
var hm = require('header-metadata') ;
var all_current = hm.current.headers ;
var ibmUser = hm.current.get("Ibm-App-User") ;
console.log(ibmUser);
console.log('session.parameters :'+session.parameters);
var my_content = hm.current.get("Content-type") ;
var options = {
target: 'http://backend.service.com',
method: 'POST',
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://localhost:8080/jnlp/" href="launch.jnlp">
<information>
<title>JNLP Launcher</title>
<vendor>ThirupathiReddy Vajjala.</vendor>
<homepage href="index.html"/>
<description> Simple JNLP APplication through server !</description>
<offline-allowed/>
</information>
@tvajjala
tvajjala / .bash_profile
Last active July 5, 2017 14:17 — forked from gwing33/.bash_profile
My git shortcuts in my ~/.bash_profile
# Git Shortcuts
alias gs='git status'
alias gst='git status -sb'
alias ga='git add'
alias gau='git add -u' # Removes deleted files
alias gp='git pull'
alias gpu='git push'
alias gc='git commit -v'
alias gca='git commit -v -a' # Does both add and commit in same command, add -m 'blah' for comment
alias gco='git checkout'
Skip to content
Safari Home
Recommended
Queue
History
Topics
Tutorials
Offers & Deals
/** Reference to logger */
private static final Logger LOGGER = LoggerFactory.getLogger(ApiDocumentationConfig.class);
@Autowired
private MessageSource msgSource;
@Bean
public Docket apiDocumentation() {
return new Docket(DocumentationType.SWAGGER_2).groupName("api").apiInfo(apiInfo()).select().paths(PathSelectors.any()).build()
.securitySchemes(newArrayList(securitySchema())).securityContexts(newArrayList(securityContext()));
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<div class="container" th:fragment="content">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<h2>Invoking RESTful WebServices beyond the proxy</h2>