Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk
3d32b5c9292444634f54bf1eab3bf11307ef3990
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 1f71b2e8682b · Showing diff
- Parent 2: f9decc67088a · Diff against parent 2
bugabingas dorkfiles
3d32b5c9292444634f54bf1eab3bf11307ef3990
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+205 / −129 text lines
+2 / −0 text lines
+3 / −0 text lines
new file mode 100644+65 / −0 text lines
- name: e-yooso z-11 keybinds: - name: F1 key: Fn + 1 - name: F2 key: Fn + 2 - name: F3 key: Fn + 3 - name: F4 key: Fn + 4 - name: F5 key: Fn + 5 - name: F6 key: Fn + 6 - name: F7 key: Fn + 7 - name: F8 key: Fn + 8 - name: F9 key: Fn + 9 - name: F10 key: Fn + 0 - name: F11 key: Fn + - - name: F12 key: Fn + + - name: left key: Fn + A - name: up key: Fn + W - name: down key: Fn + S - name: right key: Fn + D - name: PrintScreen key: Fn + P - name: Home key: Fn + [ - name: End key: Fn + ] - name: PageUp key: Fn + ; - name: PageDown key: Fn + ' - name: Insert key: Fn + . - name: Delete key: Fn + /- name: us intl keybinds: - name: ä (ae umlaut) key: Alt Gr + Q - name: ö (oe umlaut) key: Alt Gr + P - name: ü (ue umlaut) key: Alt Gr + Y - name: ß (ss) key: Alt Gr + S - name: ß (ss) key: Alt Gr + S - name: € (euro) key: Alt Gr + 5+1 / −1 text lines
+2 / −1 text lines
+2 / −2 text lines
+2 / −2 text lines
+2 / −2 text lines
+73 / −73 text lines
import static java.lang.System.*;import java.net.*;import java.net.http.*;import java.net.http.HttpClient.*;import java.net.http.HttpResponse.*;import java.nio.file.*;import java.util.*;import java.util.regex.*;class download { public static void main(String[] command_line_arguments) { if (command_line_arguments.length < 1) { usage(); fail("give me an url to download from!"); } var client = HttpClient.newBuilder().followRedirects(Redirect.NORMAL).build(); var source_name = command_line_arguments[0]; var source = URI.create(source_name); var current_working_directory = System.getProperty("user.dir"); Path target; if (command_line_arguments.length == 2) { target = Paths.get(current_working_directory, command_line_arguments[1]); } else { target = Paths.get(current_working_directory, guess_file_name(source_name)); } out.printf("Downloading %s into %s.%n", emphasize_local(source.toString()), emphasize_local(target.toString())); download_ressource(client, source, target); // TODO: download links in html to other pages exit(); } static String guess_file_name(String name) { return name.replaceAll("\\w+:\\/\\/", "").replaceAll("\\/", "_"); } static void download_ressource(HttpClient client, URI source, Path target) { //TODO: handle copmressed ressources //TODO: show progess var request = HttpRequest.newBuilder().uri(source).build(); client .sendAsync(request, BodyHandlers.ofFile(target)) .thenAccept(response -> out.printf("Downloaded %s into %s!%n", emphasize_local(source.toString()), emphasize_global(response.body().toString()))) .join(); } static void usage() { out.printf("Downloads a file from an %s.%n", emphasize_local("URL")); out.printf("%s: java download.java <source url> <destination path>%n", emphasize_global("Usage")); } static void exit() { out.printf("%s!%n", emphasize_local("Done")); System.exit(0); } static String emphasize_global(String message) { return "\033[4m" + message + "\033[0m"; } static String emphasize_local(String message) { return "\033[3m" + message + "\033[0m"; } static void fail(String message, Object... arguments) { out.printf(message, arguments); System.exit(-1); } static void fail() { System.exit(-1); }}import static java.lang.System.*;
import java.net.*;
import java.net.http.*;
import java.net.http.HttpClient.*;
import java.net.http.HttpResponse.*;
import java.nio.file.*;
import java.util.*;
import java.util.regex.*;
class download {
public static void main(String[] command_line_arguments) {
if (command_line_arguments.length < 1) {
usage();
fail("give me an url to download from!");
}
var client = HttpClient.newBuilder().followRedirects(Redirect.NORMAL).build();
var source_name = command_line_arguments[0];
var source = URI.create(source_name);
var current_working_directory = System.getProperty("user.dir");
Path target;
if (command_line_arguments.length == 2) {
target = Paths.get(current_working_directory, command_line_arguments[1]);
} else {
target = Paths.get(current_working_directory, guess_file_name(source_name));
}
out.printf("Downloading %s into %s.%n", emphasize_local(source.toString()), emphasize_local(target.toString()));
download_ressource(client, source, target);
// TODO: download links in html to other pages
exit();
}
static String guess_file_name(String name) {
return name.replaceAll("\\w+:\\/\\/", "").replaceAll("\\/", "_");
}
static void download_ressource(HttpClient client, URI source, Path target) {
//TODO: handle copmressed ressources
//TODO: show progess
var request = HttpRequest.newBuilder().uri(source).build();
client
.sendAsync(request, BodyHandlers.ofFile(target))
.thenAccept(response -> out.printf("Downloaded %s into %s!%n", emphasize_local(source.toString()), emphasize_global(response.body().toString())))
.join();
}
static void usage() {
out.printf("Downloads a file from an %s.%n", emphasize_local("URL"));
out.printf("%s: java download.java <source url> <destination path>%n", emphasize_global("Usage"));
}
static void exit() {
out.printf("%s!%n", emphasize_local("Done"));
System.exit(0);
}
static String emphasize_global(String message) {
return "\033[4m" + message + "\033[0m";
}
static String emphasize_local(String message) {
return "\033[3m" + message + "\033[0m";
}
static void fail(String message, Object... arguments) {
out.printf(message, arguments);
System.exit(-1);
}
static void fail() {
System.exit(-1);
}
}
+8 / −3 text lines
+38 / −38 text lines
#!/usr/bin/bash## ANSI color scheme script featuring Space Invaders## Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921# Modified by lolilolicon#f=3 b=4for j in f b; do for i in {0..7}; do printf -v $j$i %b "\e[${!j}${i}m" donedonebld=$'\e[1m'rst=$'\e[0m'cat << EOF $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst $f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst $f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst $bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst $bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst $bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst $bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst $f7▌$rst $f7▌$rst $f7 ▄█▄ $rst $f7▄█████████▄$rst $f7▀▀▀▀▀▀▀▀▀▀▀$rst#!/usr/bin/bash
#
# ANSI color scheme script featuring Space Invaders
#
# Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
# Modified by lolilolicon
#
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
done
bld=$'\e[1m'
rst=$'\e[0m'
cat << EOF
$f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
$f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
$f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst
$f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst
$bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
$bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
$bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst
$bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst
$f7▌$rst
$f7▌$rst
$f7 ▄█▄ $rst
$f7▄█████████▄$rst
$f7▀▀▀▀▀▀▀▀▀▀▀$rst
+6 / −6 text lines
+1 / −1 text lines