Skip to content

Instantly share code, notes, and snippets.

View juanje's full-sized avatar

Juanje Ojeda juanje

View GitHub Profile
RUN rpm-ostree install gdm firefox gnome-kiosk-script-session plymouth-system-theme
RUN rm -rf /var/lib/gdm/.config/pulse/ && rm -rf /var/lib/xkb/README.compiled
RUN echo -e "\
#Enable autologin for the user core \n\
# GDM configuration storage \n\
[daemon] \n\
# Uncomment the line below to force the login screen to use Xorg \n\
#WaylandEnable=false \n\
AutomaticLogin=core \n\
carlwgeorge / gnome.yml
Last active June 6, 2024 20:23
ansible playbook for my gnome setup
# To determine what dconf keys and values to use, you can run `dconf watch /`
# in a terminal as you make changes in settings or tweaks. You can also use
# `dconf read <key>` and `dconf write <key> <value>` to experiment with various
# settings. The dconf-editor application is also useful for exploring various
# keys along with their descriptions.
- hosts: localhost
181192 /
Last active May 14, 2024 06:16
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
alces /
Last active June 13, 2024 02:02
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local playbook.yml
  • using inventory: ansible_connection=local
masonforest / Dockerfile
Last active March 18, 2020 16:34
Test Drive Your Dockerfiles with RSpec and ServerSpec
FROM ubuntu:14.04
MAINTAINER Mason Fischer <>
RUN apt-get update && apt-get install -y nodejs
shamil /
Last active June 17, 2024 17:27
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
andrewxhill /
Last active June 11, 2021 15:27
command-line python interface for manipulating data on CartoDB
import os
import urllib
import urllib2
import base64
import json
import sys
import argparse
import requests
except ImportError:
Kartones /
Last active June 18, 2024 15:09
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
coderanger /
Last active August 18, 2023 18:33
How to patch Ubuntu for Heartbleed

How to patch Ubuntu for Heartbleed

  1. sudo apt-get update
  2. sudo apt-get install -y libssl1.0.0 openssl
  3. openssl version -a and confirm the "built on" date is >= 2014-04-07
  4. sudo lsof -n | grep ssl | grep DEL and restart all listed services.

Repeat #4 until no results are returned.

welsh /
Last active November 2, 2020 18:05
Server Status Squares: A Dashing Dashboard Widget to represent a Server Status as a Colored Square.

Server Status Squares

A Dashing widget that checks whether a server is responding to either an http or ping request using smaller squares to represent its status.

This is based off of the Server Status widget that willjohnson developed but modified to work across multiple squares rather than be one square with a list.


The widget updates the appropriate squares color upon determining its status. Statuses are as follows: