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
#!/bin/bash | |
yum update -y | |
yum install -y httpd | |
systemctl start httpd | |
systemctl enable httpd | |
echo "<h1> Hello from $(hostname -f) </h1>" > /var/www/html/index.html |
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 hudson.model.* | |
import hudson.model.labels.LabelAtom | |
updateJenkinsLabel(Hudson.instance.items,"<Replace With Old Label>", "<Replace With new Label") | |
def updateJenkinsLabel(items, oldLabel, newLabel) { | |
for (item in items) { | |
// Find out if it is a folder | |
if (item.class.canonicalName != 'com.cloudbees.hudson.plugins.folder.Folder') { |
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
https://dkbalachandar.wordpress.com/2016/07/05/thread-dump-from-a-docker-container/ | |
Thread & Heap dumps From a Docker container | |
Follow the below steps to take the thread and Heap dumps from a docker container | |
1. Run the below command to bash into the container. Please change the CONTAINER_NAME appropriately | |
docker exec -it CONTAINER_NAME bash |
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
One of the greatest ways that you add value and make important contributions is: | |
Your dedicated effort to do the best and goal-oriented attitude | |
For example, I can think of two scenarios. | |
- Scenario1 : | |
I found you to be quite Goal oriented. Right from 8th/9th grade, you seems to have a clear target | |
in mind on what to do in future and you marched towards it with absolute dedication and kept the unncessary noise/distractions | |
at Bay. Also, you tried to help others by offering construictive advice but never crossed boundaries. | |
- Scenario2: |
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
rem This script reconfigures the Cygwin sshd service. | |
rem It regenerates the computer's host keys. This is necessary | |
rem when Sysprep is run and a new SID is generated. | |
@echo off | |
echo Stopping the Cygwin sshd service... | |
net stop sshd | |
echo ERRORLEVEL: %ERRORLEVEL% |
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.util.*; | |
import java.io.*; | |
import java.security.*; | |
public class ChangePassword | |
{ | |
private final static JKS j = new JKS(); | |
public static void main(String[] args) throws Exception | |
{ |
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
If minuphours = 0 , code will be evaluating other rules like idle termination time i.e. as if this option doesn't exist.See below code. It prints "Evaluate other rules" message if minUpHours=0 | |
import java.util.concurrent.TimeUnit; | |
public class MinCheck { | |
public static void main(String[] args) { | |
// Check min number of hours instance must be up - if stayed up at least that minimum. | |
int minUpHours = 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
jenkins.model.Jenkins.instance.labels.each { it.reset() } |
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
(Picked important points from https://github.com/yangshun/tech-interview-handbook/tree/master/preparing ) | |
1) Pick a programming language to do your interviews in. IMO Python or Java are best bets. | |
Domain-specific position interviews may differ in some companies - Front End/iOS/Android Engineer roles. | |
2) Master through practice | |
a) http://www.crackingthecodinginterview.com/ --> Buy this book and read it | |
b) For online practice |
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
(Picked important points from https://github.com/yangshun/tech-interview-handbook/tree/master/preparing ) | |
1) Pick a programming language to do your interviews in. IMO Python or Java are best bets. | |
Domain-specific position interviews may differ in some companies - Front End/iOS/Android Engineer roles. | |
2) Leet code and 'Cracking the coding interview' | |
3) Review your concepts | |
https://github.com/kdn251/interviews | |
https://medium.com/basecs |
NewerOlder