Make sure systemd is installed.
systemctl
This command should list all installed services.
| import java.util.HashMap; | |
| import java.util.Map; | |
| // http://stackoverflow.com/questions/3437897/how-to-get-a-class-instance-of-generics-type-t | |
| public class GenericsTest { | |
| public static class MyClass extends Object { | |
| } |
| import java.util.HashMap; | |
| import java.util.Map; | |
| public class IocKeySample { | |
| public static class Key<T> { | |
| private final String key; | |
| private Key(String key) { |
| public class UpsertTask { | |
| private interface Executor { | |
| void execute() throws TaskExecutionException; | |
| } | |
| private Executor executeMethod; | |
| public void prepare() { | |
| if (/*something*/) { |
| #!/bin/sh | |
| # Script to split flac/ape CD rips by cue data and encode tracks to ogg vorbis files. | |
| # | |
| # Put the script to a directory in your PATH. | |
| # | |
| # And then go to a directory containing .cue file and .flac/.ape file and run the command: | |
| # cue-split.sh | |
| # | |
| # Or if the .cue is not in utf-8, decode it providing the -c flag with the original encoding: |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| from urllib.parse import urlencode, urlparse, parse_qs | |
| import webbrowser | |
| import http.server | |
| import socketserver | |
| from datetime import datetime, timedelta | |
| import requests |
You need to add the Backports repository where the OpenJDK 8 package is located.
Add the file /etc/apt/sources.list.d/backports.list with this content:
# Backports repository
deb http://ftp.debian.org/debian jessie-backports main contrib non-free
(You may replace http://ftp.debian.org/debian with any closer mirror, or even http://httpredir.debian.org/debian.)
| /** | |
| * A pair of any objects with correct equals() and hashCode() overridden. | |
| * @param <T> type of the fist element of the pair | |
| * @param <U> type of the second element of the pair | |
| */ | |
| public final class Pair<T, U> { | |
| private final T first; | |
| private final U second; |
| import com.amazonaws.services.dynamodbv2.document.PrimaryKey | |
| import com.amazonaws.services.dynamodbv2.document.api.UpdateItemApi | |
| import com.amazonaws.services.dynamodbv2.model.ConditionalCheckFailedException | |
| fun UpdateItemApi.nestedIncrement(key: PrimaryKey, attribute: String, path: List<String>, increment: Int) { | |
| tryToIncrement(key, listOf(attribute) + path, increment) | |
| } | |
| private fun List<String>.toPathExpression(): String = | |
| mapIndexed { index, _ -> "#p$index" }.joinToString(".") |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| import csv | |
| import requests | |
| import time | |
| # Create and register your app in Slack. | |
| # You need the Legacy Token here: https://api.slack.com/custom-integrations/legacy-tokens |