Skip to content

Instantly share code, notes, and snippets.

Mika Koivisto mikakoivisto

Block or report user

Report or block mikakoivisto

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
View listCacheMBeanInfo.js
var MIN_MISS_PERCENTAGE = 10;
var fields = [ "CacheType", ".Bean", "ObjectCount", "CacheHits", "CacheMisses", "CacheMissPercentage" ];
var padding30 = Array(30).join(' '), padding12 = Array(12).join(' '), padding20 = Array(20).join(' ');
var platformMBeanServer = Packages.java.lang.management.ManagementFactory.getPlatformMBeanServer();
function printInColumns(values) {
var beanName = values[1];
@mikakoivisto
mikakoivisto / le-renew.sh
Created May 29, 2016 — forked from bjornjohansen/le-renew.sh
Let's Encrypt renewal script for Nginx
View le-renew.sh
#!/bin/bash
#================================================================
# Let's Encrypt renewal script for Nginx based on the script
# by Erika Heidi for Apache on Ubuntu/Debian
# @author Erika Heidi<erika@do.co>
# @author Bjørn Johansen <post@bjornjohansen.no>
# Usage: ./le-renew.sh [base-domain-name] [path-to-webroot]
#================================================================
domain=$1
webroot=$2
@mikakoivisto
mikakoivisto / java7install.sh
Created Apr 22, 2015
Ubuntu 14.04 Java 7 automated install script
View java7install.sh
cat - <<-EOF >> /etc/apt/sources.list.d/webupd8team-java.list
# webupd8team repository list
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
EOF
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xEEA14886
echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections
View plexconnect
#!/bin/bash
### BEGIN INIT INFO
# Provides: plexconnect
# Required-Start: plexmediaserver networking
# Required-Stop: plexmediaserver networking
# Default-Start: 3 4 5
# Default-Stop: 0 1 6
# Short-Description: This is the Plex Connect daemon
# Description: This script starts the Plex Connect
# Python scripts in a detached screen.
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.liferay.sample</groupId>
<artifactId>sample-project</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>sample-project</name>
You can’t perform that action at this time.