Skip to content

Instantly share code, notes, and snippets.

View bovender's full-sized avatar
💭
absorbed by my daytime job

Daniel Kraus bovender

💭
absorbed by my daytime job
View GitHub Profile
@bovender
bovender / nextcloud.sh
Created December 13, 2022 06:37
Run latest Nextcloud Appimage available.
#!/bin/bash
DIR=~/local/Downloads
CLIENT=$(ls "$DIR"/Nextcloud-* 2>/dev/null | tail -n 1)
echo $CLIENT
if [ -e "$CLIENT" ]; then
echo "Starting Nextcloud client in background..."
set +x
LC_ALL=en_US "$CLIENT" & disown
else
echo "Error: Nextcloud client not found in $DIR"
@bovender
bovender / hello-world.pdf
Created January 17, 2018 04:40
Simple 'hello world' PDF
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bovender
bovender / rsync-sudo.sh
Last active December 14, 2017 11:10
rsync with sudo on a remote Ubuntu machine
#!/bin/bash
# Uses rsync with sudo privileges on a remote machine
# By Daniel Kraus (bovender), released into the public domain
#
# Inspired by: https://unix.bris.ac.uk/2015/08/04/rsync-between-two-hosts-using-sudo-and-a-password-prompt/
#
# To use this, an askpass program must be installed on the
# remote node. For Debian/Ubuntu systems, use:
#
@bovender
bovender / android-studio.desktop
Created July 5, 2017 07:00
Make Android Studio available in the Ubuntu Unity launcher
# ~/.local/share/applications/android-studio.desktop
# This file expects Android Studio in /opt
[Desktop Entry]
Name=Android Studio
GenericName=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Icon=/opt/android-studio/bin/studio.png
Terminal=false
Type=Application
@bovender
bovender / _hreflang.html.haml
Last active May 8, 2017 09:13 — forked from waissbluth/_hreflang.html.haml
Ruby on Rails SEO. Add a <link rel="alternate" hreflang="es" href="http://es.example.com/" /> link to every other locale for the same page. Per https://support.google.com/webmasters/answer/189077?hl=en
-# For each locale except the current one
- I18n.available_locales.each do |locale|
-# Add a link to the current URL but in `locale` language
%link{rel: 'alternate', hreflang: locale, href: url_for(locale: locale, only_path: false)}