Skip to content

Instantly share code, notes, and snippets.

View astral303's full-sized avatar

Oleg Rekutin astral303

  • Evergage
  • Somerville, MA
View GitHub Profile
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@alexcpn
alexcpn / histogramparser.py
Created June 24, 2015 06:11
Here is a script to compare two jmap class histogram dumps, to see which classes are increasing memory. This can be used as a rough tool in checking suspect classes while analyzing Java memory leaks, as dumping large heaps and analyzing the same can be hard
__author__ = 'acp'
import re
import fileinput
import operator
import sys
objectschanged={}
def create_object_list(line2,mapofObjects,instance):
@sebsto
sebsto / gist:20e550876db521710186
Created February 12, 2015 16:38
Block users access to AWS EC2 meta data
sudo iptables -A OUTPUT -m owner ! --uid-owner root -d 169.254.169.254 -j DROP
@benjchristensen
benjchristensen / DebounceBuffer.java
Last active March 1, 2024 15:46
DebounceBuffer: Use publish(), debounce() and buffer() together to capture bursts of events.
import java.util.List;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Subscriber;
import rx.schedulers.Schedulers;
public class DebounceBuffer {
public static void main(String args[]) {
@Pyrolistical
Pyrolistical / functions.js
Last active December 28, 2017 04:10 — forked from RedBeard0531/functions.js
Mongo map reduce functions to calculate sum, min, max, count, average, population variance, sample variance, population standard deviation, sample standard deviation Public Domain License
function map() {
emit(1, {
sum: this.value, // the field you want stats for
min: this.value,
max: this.value,
count: 1,
diff: 0
});
}
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git