Skip to content

Instantly share code, notes, and snippets.

View atomAltera's full-sized avatar
🏠
Working from home

Konstantin Alikhanov atomAltera

🏠
Working from home
  • Nuclight
  • Tbilisi
View GitHub Profile
@atomAltera
atomAltera / T_Watcher.java
Last active January 3, 2016 14:19
Simple Java Watch Service implementation
import java.io.IOException;
import java.nio.file.*;
import static java.nio.file.StandardWatchEventKinds.*;
public class T_Watcher {
public static void main(String[] args) throws IOException {
Path target_path = Paths.get(args.length > 0 ? args[0] : "/");
WatchService w_serv = FileSystems.getDefault().newWatchService();
@atomAltera
atomAltera / T_FileAttrs.java
Last active January 3, 2016 13:39
Simple cmd tool to extract and displat file attrs
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.*;
public class T_FileAttrs {
public static void print_usage() {
System.err.println("Usage: java Javast [-s] <path to file> [<path to file> ...]");
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div class="header">
<a class="btn" href="#">Click me</a>