Skip to content

Instantly share code, notes, and snippets.

@elit69
elit69 / LoggingHttpFilter.java
Last active October 5, 2019 05:00 — forked from int128/RequestAndResponseLoggingFilter.java
Spring Web filter for logging request and response
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Enumeration;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.servlet.FilterChain;
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
#1 sync commit branchA
#2 sync commit branchB
#3 merge branchA to branchB
#$ m branchA branchB KHPROJ-1010 'update something'
m() { git add . && git commit -m "$3 $4" && git pull origin $1 && git push origin $1 && git checkout $2 && git pull origin $2 && git pull origin $1 && git push origin $2 && git checkout $1; }
#1 sync commit branchA
#$ gp branchA KHPROJ-1010 'update something'
gp() { git add . && git commit -m "$2 $3" && git pull origin $1 && git push origin $1; }
# wget https://gist.githubusercontent.com/elit69/00486e5da8862107fc1f02fda513f8b2/raw/a0d8714f33eb28596af5fcec23d1b81604bff366/watch.sh
# chmod +xr watch.sh
# ./watch.sh '' '' '' '' > watch.log &
# $1 = *.log
# $2 = pattern1
# $3 = pattern2
# $4 = web hook end point
tail -Fn0 $1 | \
@elit69
elit69 / AddArray
Last active December 18, 2015 13:39
#include <iostream>
using namespace std;
int main(void)
{ int na;
cin >> na;
int *a = new int[na];
cout << "array a" << endl;
for(int i=0; i<na; i++) {
cin >> a[i];
}
#include<iostream.h>
bool search(int a[],int n,int num)
{ for(int i=0; i<n; i++) {
if(a[i] == num) {
return true;
}
}
return false;
}
int main(void)