Skip to content

Instantly share code, notes, and snippets.

View JensMeiners's full-sized avatar

Jens Meiners JensMeiners

View GitHub Profile
@nl5887
nl5887 / transfer.fish
Last active July 30, 2024 09:21
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@mrWinston
mrWinston / FuturesConcurrency.java
Last active October 6, 2017 12:06
Java Futures usage #java #future #concurrency #multithreading #communication
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details.
*/
/**
* Executes Multiple futures
*
*/
@mrWinston
mrWinston / openWebPage.java
Last active May 6, 2016 09:21
Open Browser window in Java #Java #browser #Runtime #webpage
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details.
*/
public static void openWebpage(String url, String... browsers) throws IOException {
String os = System.getProperty("os.name").toLowerCase();