Skip to content

Instantly share code, notes, and snippets.

View davinkevin's full-sized avatar
👋
Working hard !

Davin Kevin davinkevin

👋
Working hard !
View GitHub Profile
@davinkevin
davinkevin / MultipartFileSender
Created February 10, 2015 16:31
Implementing HTTP byte-range requests in Spring 4 and other framework...
package lan.dk.podcastserver.utils.multipart;
import lan.dk.podcastserver.utils.MimeTypeUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@topheman
topheman / jspm.travis.setup.md
Created August 4, 2015 18:49
Travis setup of Github token for jspm
@davinkevin
davinkevin / How long is a digest cycle ?
Last active December 14, 2016 12:25
Count the number of watchers in AngularJS 1 include in bookmarklet
javascript:(function() {
if (!angular) {
alert('Not a angular application or window.angular not found');
return;
}
var entryNode = document.querySelector('[ng-app]') || document.querySelector('.ng-scope');
if (!entryNode) {
alert('No entryPoint found');
@jirutka
jirutka / LICENSE
Last active August 9, 2022 09:39
Generate a new GPG key pair in a temporary GPG Home and export it to a file. It can run completely unattended, without prompting for a passphrase.
The MIT License
Copyright 2018-2019 Jakub Jirutka <jakub@jirutka.cz>.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@wvengen
wvengen / upgrade-pg.py
Last active March 12, 2024 12:31
Major upgrade PostgreSQL on cloudnative-pg
#!/usr/bin/env python3
#
# Helper script to do major version upgrades of a cloudnative-pg based
# PostgreSQL cluster.
#
# Usage: python3 upgrade-pg.py <cluster-name> <new-pg-version>
#
# Example: python3 upgrade-pg.py my-backend-db 16.0
#
# Make sure to include major and minor version in the pg version.