Skip to content

Instantly share code, notes, and snippets.

Vadim Kotov vkotovv

Block or report user

Report or block vkotovv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Broken Image Repairer

What is the problem?

A long time ago, it was possible to inline images from all kinds of external sources. Since the switch from HTTP to HTTPS, this is no longer possible; only HTTPS sources are allowed. This leads to ugly blurbs like

alt text

instead of a nicely formatted page with images. Sometimes, the links don't even work anymore, even with HTTPS images, which will show like this: ... Luckily, we have the Wayback Machine which is able to rescue some of the lost images. Since a picture often says more than a thousand words, it's important to bring back the post into its original state; important enough to justify the occasional bump of an old post (see below).

giansalex /
Created Apr 6, 2018
DigitalOcean Coupon Code $35 / $100 1 Year Free Trial - April 2018

alt text

Digital Ocean Promo Coupon Code $35 / $100 1 Year Free Trial

1) Get $35 / $25 / $20 / $10 free DigitalOcean Credit.

2) Get DigitalOcean 1 Year Free Trial.

3) Get $100 Credit For 60 Days. $100 Free Credits

darnmason / SwipeView.kt
Last active Jul 29, 2019
A custom Android ViewGroup that contains a single child and allows you to swipe it to the left, with a callback once the swipe is complete. For example to dismiss a view. Works well in a LinearLayout with animateLayoutChanges=true when setting the SwipeView visibility to GONE on swipe.
View SwipeView.kt
import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import android.view.View
import android.widget.FrameLayout
class SwipeView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout(context, attrs, defStyleAttr) {
aqua30 /
Last active Sep 4, 2019
Show/Hide view on up/down scroll in android - Using ScrollView
* Created by Saurabh(aqua) in 2017.
public class ScrollActivity extends BaseActivity {
/* view binding */
@BindView( scrollView;
@BindView( parallaxImage;
@BindView( textView;
refactorsaurusrex / jenkinsfile.groovy
Created May 22, 2017
Jenkins Pipeline: How to get the status of the previous build
View jenkinsfile.groovy
node('whatever') {
stage('blah') {
echo currentBuild.getPreviousBuild().result
// ref:
mshkrebtan /
Last active Nov 18, 2019
Run Cisco Webex on 64-bit Ubuntu 16.04

Run Cisco Webex on 64-bit Ubuntu 16.04

With Audio and Screen Sharing Enabled

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386
bkemper / gist:ca6ac68b174a047b5ccde3930c8568dc
Last active Jul 2, 2019
How to edit a commit with interactive rebase
View gist:ca6ac68b174a047b5ccde3930c8568dc

While on a branch with a couple of commits, you can edit a commit with interactive rebase. This should be used sparingly and only on branches and never on master.

  1. Checkout the branch

$ git checkout my-branch

  1. Get the ref of the commit that you want to edit from the commit log. (e.g. 67b191fc62eda52b5b208cc4de50df7144a03171)

$ git log

jonico / Jenkinsfile
Last active Nov 16, 2019
Example for a full blown Jenkins pipeline script with multiple stages, kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage c…
View Jenkinsfile
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
- name: mvn
image: maven:3.3.9-jdk-8-alpine
gortok /
Last active Oct 18, 2019
Python Pre Receive hook for checking commit messages
import sys
import re
import subprocess
#Format: "oldref newref branch"
line =
(base, commit, ref) = line.strip().split()
new_branch_push = re.match(r'[^1-9]+', base)
daicham / .gitlab-ci.yml
Last active Nov 17, 2019
A sample of .gitlab-ci.yml for a gradle project
View .gitlab-ci.yml
image: java:8-jdk
- build
- test
- deploy
# - echo `pwd` # debug
You can’t perform that action at this time.