Skip to content

Instantly share code, notes, and snippets.

View pditommaso's full-sized avatar
💭
Vita brevis, ars longa

Paolo Di Tommaso pditommaso

💭
Vita brevis, ars longa
View GitHub Profile
@petrbouda
petrbouda / memory-limit-request-jvm.md
Last active March 10, 2024 22:55
Memory LIMIT and REQUEST in Containers and JVM

Memory LIMIT and REQUEST in Containers and JVM

  • Do you run a JVM inside a container on Kubernetes (or maybe OpenShift)?
  • Do you struggle with REQUEST and LIMIT parameters?
  • Do you know the impact of those parameters on your JVM?
  • Have you met OOM Killer?

Hope you will find answers to these questions in this example-based article.

How to set up JVM Heap size in a Container

@asim
asim / ossvscloud.md
Last active December 3, 2018 22:34
OSS vs Cloud

OSS vs Cloud

This is a list of resources about OSS vs Cloud.

Overview

The resources here highlight the trend of Cloud vendors picking up popular OSS projects and providing managed services to increase their margin and opportunity. In the majority of cases without contributing back to the OSS development itself. COSS companies formed by the creators of these OSS projects are fighting a new reality in which building a business around OSS becomes even more difficult.

OSS sustainability is potentially being set back by the unlawful practices of Cloud giants.

@ewels
ewels / NF_logo.png
Created June 14, 2017 15:16
NextFlow Multipart HTML Emails
Save NextFlow logo as this file.
@andystanton
andystanton / Start up local Docker Machine on OSX automatically.md
Last active April 3, 2024 00:50
Start up local Docker Machine on OSX automatically.

Notice

This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.

Requirements

  • Docker Machine + Docker
  • curl
  • A Virtualbox-driven Docker Machine called "default" docker-machine create --driver virtualbox default (this is the default with Docker toolkit).
@samuell
samuell / reseqtut_lmw.py
Last active October 3, 2016 12:29
Some steps from the the Re-sequencing NGS intro tutorial [1], using Luigi workflow system [2] with the Luigi's Monkey Wrench [3] wrapper. (Refs: [1]: http://uppnex.se/twiki/do/view/Courses/NgsIntro1502/ResequencingAnalysis.html [2]: https://github.com/spotify/luigi [3]: https://github.com/samuell/luigis_monkey_wrench )
import luigi
from luigis_monkey_wrench import *
REF='human_17_v37.fasta'
INDIVIDUALS=['NA06984','NA07000']
SAMPLES=['1','2']
BASENAME='.ILLUMINA.low_coverage.17q_'
PICARDDIR='/sw/apps/bioinfo/picard/1.69/kalkyl/'
KNOWNSITES='/proj/g2014207/labs/gatk/ALL.chr17.phase1_integrated_calls.20101123.snps_indels_svs.genotypes.vcf'
@melix
melix / fatfingers.groovy
Last active August 29, 2015 14:06
Fat fingers correction in Groovy
import org.codehaus.groovy.reflection.ClassInfo
import org.codehaus.groovy.runtime.MethodRankHelper
trait FatFingers {
def methodMissing(String name, args) {
def ci = ClassInfo.getClassInfo(this.class)
def methods = [*ci.metaClass.methods,*ci.metaClass.metaMethods]
def sugg = MethodRankHelper.rankMethods(name,args,methods)
if (sugg) {
sugg[0].invoke(this, args)
anonymous
anonymous / CSS-Circle-Hover-Animations.markdown
Created December 13, 2013 15:40
A Pen by Paolo Di Tommaso.
@timyates
timyates / hexdump.groovy
Last active December 30, 2015 00:19
Hexdump byte[] in Groovy via the metaClass
byte[].metaClass.hexdump { int idx, int len ->
println ''' +--------------------------------------------------+
| | 0 1 2 3 4 5 6 7 8 9 a b c d e f |
| +----------+--------------------------------------------------+------------------+'''.stripMargin()
delegate[ idx..<(idx+len) ].with { bfr ->
def bytes = bfr.collect { String.format( '%02x', it ) }
.collate( 8 )
.collate( 2 )
.collect { a, b -> ( a + [ '' ] + b ).join( ' ' ).padRight( 48, ' ' ) }
def ascii = bfr.collect { it > 0x1f && it < 0x7f ? (char)it : '.' }
@Dierk
Dierk / AntMoves.groovy
Created August 28, 2013 18:48
Massively parallel consistent ant moves
import groovy.transform.Immutable
import groovyx.gpars.dataflow.KanbanFlow
import groovyx.gpars.dataflow.KanbanLink
import groovyx.gpars.dataflow.KanbanTray
import groovyx.gpars.dataflow.ProcessingNode
import static groovyx.gpars.dataflow.ProcessingNode.node
/*
For a general introduction see https://gist.github.com/Dierk/6365780.
@joemiller
joemiller / raid_ephemeral.sh
Last active October 23, 2023 21:53
detect all ephemeral disks on EC2 then stripe together in a raid-0 vol mounted at /mnt
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"