Skip to content

Instantly share code, notes, and snippets.

View dgdavid's full-sized avatar

David Díaz dgdavid

View GitHub Profile
@dgdavid
dgdavid / My first Ansible playbook.md
Last active August 29, 2015 14:15
My first playbook for provisioning Ubuntu vagrant machine to test Aurelia JavasScript framework
@dgdavid
dgdavid / css-ene-letter.markdown
Last active August 29, 2015 14:17
Ñ for CSS Sans Font
@dgdavid
dgdavid / normalize-svg-icons
Last active July 5, 2017 08:39
WIP - normalize svg icons script
#!/bin/bash
size="$1"
NC='\033[0m' # No Color
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
@dgdavid
dgdavid / get_version_id_from_os_release.sh
Last active September 18, 2018 11:42
Simple example of how to get the VERSION_ID from /etc/os-release in a shell script
#!/usr/bin/env bash
# See https://www.freedesktop.org/software/systemd/man/os-release.html
version_id=$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | tr -d '"')
echo $version_id
@dgdavid
dgdavid / working_with_functions_in_bash.sh
Last active September 18, 2018 11:52
Testing how to work with functions in a shell script
#!/usr/bin/env bash
function this_and_that_are_equals () {
this="me"
that="you"
if [ $this = $that ]; then
return 0
else
return 1
@dgdavid
dgdavid / btrfs_checker.rb
Last active January 30, 2019 13:55
Check if the given path is in a btrfs filesystem
require 'yast'
require 'yast2/execute'
require 'pathname'
# Returns if the given path is placed in a btrfs
#
# @param path [String, Pathname]
#
# @return [Boolean]
def btrfs_available_for?(path)

Executing YaST Firstboot with an specific resolution

Yesterday, a guy from docu team ask me for help executing YaST Firstboot in an specific resolution.

Well, I'm trying to make screenshots of the SAP wizard. (...) , so I only need to log in with ssh and execute /usr/lib/YaST2/startup/YaST2.Firstboot. That works so far.

However, the script doesn't allow me to change the screen/window size. I need my screenshots in 800x600. Unfortunately, the script doesn't know the -g/--geometry option that is known in YaST.

Any hints? 🙂