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: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
@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:06b3d28078f769eb6c8523ee7724869a
Created August 2, 2016 17:29
Copy jenkins config.xml only
rsync -am --include='config.xml' --include='*/' --exclude='*' Source/ Destination/
Install .NET from command line
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
1) Overide entry point of docker image
docker run -ti --entrypoint=/bin/bash my/image -s
@snallami
snallami / Update Jenkins Label
Created June 3, 2016 20:35
Groovy script to update jenkins label
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') {
import hudson.model.*
disableChildren(Hudson.instance.items)
def disableChildren(items) {
def daysToKeep = 14
def numToKeep = 10
def artifactDaysToKeep = -1
def artifactNumToKeep = -1
@snallami
snallami / gist:0670546d66dfb2ed5219
Last active December 17, 2015 05:57
my booksmarks
1) http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html
2) Jenkins SSH slaves
https://docs.google.com/document/d/1Qq-EkiUnC5x8BuM4AZWo-yRUQTrkberzz8JfdCM6yuc/edit
3) http://techblog.roomkey.com/posts/too-many-files.html
@snallami
snallami / gist:bd1a8018a624375b33c0
Last active November 4, 2015 22:41
my random Artifactory notes
1) Linux. Artifactory start/stop
# To Start
$ARTIFACTORY_HOME/bin/artifactory.sh (concole)
$ARTIFACTORY_HOME/bin/artifactoryctl start (daemon)
$ARTIFACTORY_HOME/bin/installService.sh [USER [GROUP]] (service)
$ARTIFACTORY_HOME/bin/artifactoryctl check | stop
2) Install script
Creates the folder /etc/opt/jfrog/artifactory, copies the configuration files there and creates a soft link in$ARTIFACTORY_HOME/etc
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.startsWith('my') }.each { q.cancel(it.task) }