Skip to content

Instantly share code, notes, and snippets.

View snallami's full-sized avatar

Suresh Nallamilli snallami

  • Los angeles, CA
View GitHub Profile
@snallami
snallami / gist:604e9a62ecc7774b0d1631dd5e4ced91
Last active August 31, 2016 01:23
Configure ssh server on port 22 and 443
1) Edit /etc/ssh/sshd_config
2) Add below so that sshd listens on both port 22 and 443
Port 22
Port 443
3) Load config and restart service
sudo service sshd reload
sudo service sshd restart
@snallami
snallami / gist:8ee9514fb430eeff1aa7463994ffc54f
Last active September 1, 2016 23:17
Force git to use https:// instead of git://
git config --global url."https://github.com/".insteadOf git@github.com
http://linuxaria.com/howto/linux-memory-management
https://linuxaria.com/howto/understanding-the-top-command-on-linux
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
@snallami
snallami / kill-scm-threads.groovy
Created January 6, 2017 20:27 — forked from andyjones/kill-scm-threads.groovy
Kills long running SCM polling threads in Jenkins
Jenkins.instance.getTrigger("SCMTrigger").getRunners().each()
{
item ->
long millis = Calendar.instance.time.time - item.getStartTime()
if(millis > (1000 * 60 * 60)) // 1000 millis in a second * 60 seconds in a minute * 3 minutes
{
Thread.getAllStackTraces().keySet().each()
{
tItem ->
@snallami
snallami / README.md
Created January 31, 2017 21:34 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" />
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
socketBuffer="500000"
tcpNoDelay="true"
port="443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="conf\tomcatNEW.keystore" keystorePass="changeit"
Morning Paper - https://blog.acolyer.org/
Dev - https://dev.to/
http://highscalability.com/
https://www.oreilly.com/ideas
https://stratechery.com/ - best tech blog on the Internet. Nothing related to coding but thorough and thoughtful take on every-day-happenings in the tech industry.
https://blog.codinghorror.com/
Safe alternative: use the host Docker daemon from within a container
The simple solution to allow a container process to start another container is to share the Docker socket of the host with the container, doing something like this:
docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name some_container some_image
Assuming that Docker is installed in the image invoked, then the Docker client run within that container will be communicating with the Docker daemon running on the host.
Any containers created from within some_container would actually be created by the same Docker daemon that created some_container itself. Those new containers would be sibling containers, siblings to some_container.
Now there should be no worries about data corruption from nested storage drivers, or shared access to the Docker image cache.
@snallami
snallami / gist:88a3e82772c4f60bcc0e285104c0d423
Created May 1, 2017 18:42
My rough notes on CJOC + CJE setup
1) Need below plugins for shared agents to work
Operations Center OpenID Cluster Session Extension
Operations Center Cloud
CloudBees SSH Build Agents Plugin
2)