Skip to content

Instantly share code, notes, and snippets.


Sergey Sudakovich sergeyhush

View GitHub Profile
sergeyhush / 0_reuse_code.js
Created Jun 4, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
sergeyhush /
Created Jun 4, 2014 — forked from jookyboi/
Python-related modules and guides.


  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.


View Git tag to commit
for tag in $(git tag);
commit=$(git rev-list -1 $tag)
echo “$tag -> $commit"
sergeyhush / delete_all_jobs.groovy
Last active Aug 29, 2015
Delete all Jenkins jobs
View delete_all_jobs.groovy
(hudson.model.Hudson.instance.items.findAll { job -> job.delete() })
sergeyhush / flush_updown_job.groovy
Last active Aug 29, 2015
Jenkins: Stop upstream job with downstream ones
View flush_updown_job.groovy
import jenkins.model.Jenkins
def upstreamName = build.buildVariableResolver.resolve("FlushJob")
def upstream = Jenkins.instance.getItem(upstreamName)
if (upstream) {
upstream.getDownstreamProjects().each { it.getLastBuild().doStop() }
#! /bin/bash
# Kill processes orphaned by Jenkins
# Work around Java's use of SIGTERM rather than SIGKILL and
# Jenkins's lack of any workaroud in the box.
# Suggested usage:
# $ crontab -l
sergeyhush / gist:efdb555fa182fcaa26c9
Last active Mar 3, 2016
Override Jenkins Git timeout on a Unix slave
View gist:efdb555fa182fcaa26c9
Goto Node->Conefigure->Advanced
Append "-Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30" to "JVM Options"

Keybase proof

I hereby claim:

  • I am sergeyhush on github.
  • I am ssergey ( on keybase.
  • I have a public key ASCSgWxQeA1Gsdj06IFETOd35unZXuJ8qS3NOqwOiQkbPQo

To claim this, I am signing this object:

sergeyhush /
Created Jul 28, 2016
Cromebook OpenVPN connection script
#!/bin/sh -e
if [ ! -d "$CONF_DIR" ]; then
echo "Could not find config dir $CONF_DIR" >&2
exit 1
sergeyhush / init.groovy
Created Dec 23, 2016
Collection of useful methods for Jenkins to be used in init.groovy.d
View init.groovy
import jenkins.model.Jenkins
class InitGroovyD {
* Install plugins.
* @param plugins Plugins to be installed
static installPlugins(String... plugins) {
def updateCenter = Jenkins.instance.updateCenter