This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONFIGURING FILEBEAT | |
==================== | |
1. rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch | |
2. vi /etc/yum.repos.d/filebeat.repo and paste | |
3. Set up to work with logstash. | |
a. Open filebeat.yml in $path.home. | |
b. comment, if not already done, the output to elasticsearch part. | |
c. uncomment, if not already done, the output to logstash. | |
d. configure port and host ip. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def nextMove(n,r,c,grid): | |
princess = () | |
for row in range(n): | |
for col in range(len(grid[row])): | |
if grid[row][col] == 'p': | |
princess = (row, col) | |
break | |
m = (r, c) | |
x = princess[0] - m[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import math | |
def displayPathtoPrincess(n,grid): | |
#print all the moves here | |
princess = () | |
for row in range(n): | |
for col in range(len(grid[row])): | |
if grid[row][col] == 'p': | |
princess = (row, col) | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create a root private key for signing certificates. (Done only once) | |
$ openssl genrsa -des3 -out rootCA.key 2048 | |
2. Self-sign this certificate | |
$ openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem | |
3. Create a certificate (Done once per device) | |
$ openssl genrsa -out my-cert.key 2048 | |
4. Now generate a CSR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading the login page by accessing protected resource | |
====================================================== | |
2018-02-11 11:08:48 [INFO] Spring Security Debugger line: 39 - | |
************************************************************ | |
Request received for '/spring_security_login': | |
org.apache.catalina.connector.RequestFacade@5a974e48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System: Host: sbsatter Kernel: 4.4.0-101-generic x86_64 (64 bit gcc: 5.4.0) | |
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.1 Serena | |
Machine: System: Gigabyte product: N/A | |
Mobo: Gigabyte model: H170M-D3H-CF Bios: American Megatrends v: F6 date: 03/07/2016 | |
CPU: Quad core Intel Core i5-6500 (-MCP-) cache: 6144 KB | |
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25536 | |
clock speeds: min/max: 800/3600 MHz 1: 800 MHz 2: 800 MHz 3: 800 MHz 4: 800 MHz | |
Graphics: Card: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1912 | |
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) | |
Resolution: 1366x768@59.79hz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System: Host: sbsatter Kernel: 4.4.0-72-generic x86_64 (64 bit gcc: 5.4.0) | |
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.2) dm: mdm Distro: Linux Mint 18.1 Serena | |
Machine: System: Gigabyte product: N/A | |
Mobo: Gigabyte model: H170M-D3H-CF v: x.x Bios: American Megatrends v: F6 date: 03/07/2016 | |
CPU: Quad core Intel Core i5-6500 (-MCP-) cache: 6144 KB | |
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25535 | |
clock speeds: min/max: 800/3600 MHz 1: 800 MHz 2: 800 MHz 3: 800 MHz 4: 800 MHz | |
Graphics: Card: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1912 | |
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) | |
Resolution: 1366x768@59.79hz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
String s=sc.next(); | |
/* Enter your code here. Print output to STDOUT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def partition(alist, first, last): | |
pivotValue= alist[first] | |
left= first+1 | |
right=last | |
done= False | |
while not done: | |
while alist[left]<pivotValue and left<right: | |
left=left+1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mergesort{ | |
public static void main(String ... args){ | |
int [] array= {5, 4, 3, 2, 1, 0}; | |
printArray(mergerSort(copyOf(array,0, array.length))); | |
} | |
static void printArray(int [] array){ | |
for(int i: array){ | |
System.out.print(i+" "); | |
} |