Skip to content

Instantly share code, notes, and snippets.

Avatar

Juanje Ojeda juanje

View GitHub Profile
@carlwgeorge
carlwgeorge / gnome.yml
Last active Oct 23, 2021
ansible playbook for my gnome setup
View gnome.yml
# https://docs.ansible.com/ansible/latest/modules/dconf_module.html
#
# 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
tasks:
@181192
181192 / increase_root_fedora.md
Last active Nov 30, 2021
How to increase the root partition size on Fedora
View increase_root_fedora.md

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
alces / ansible_local_playbooks.md
Last active Nov 23, 2021
How to run an Ansible playbook locally
View ansible_local_playbooks.md
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@masonforest
masonforest / Dockerfile
Last active Mar 18, 2020
Test Drive Your Dockerfiles with RSpec and ServerSpec
View Dockerfile
FROM ubuntu:14.04
MAINTAINER Mason Fischer <mason@thoughtbot.com>
RUN apt-get update && apt-get install -y nodejs
@andrewxhill
andrewxhill / cartodb-utils.py
Last active Jun 11, 2021
command-line python interface for manipulating data on CartoDB
View cartodb-utils.py
import os
import urllib
import urllib2
import base64
import json
import sys
import argparse
try:
import requests
except ImportError:
@Kartones
Kartones / postgres-cheatsheet.md
Last active Dec 3, 2021
PostgreSQL command line cheatsheet
View postgres-cheatsheet.md

PSQL

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
coderanger / README.md
Last active Mar 8, 2018
How to patch Ubuntu for Heartbleed
View README.md

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
welsh / README.md
Last active Nov 2, 2020
Server Status Squares: A Dashing Dashboard Widget to represent a Server Status as a Colored Square.
View README.md

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.

Description

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

@rcmorano
rcmorano / docker-cheat-sheet.md
Last active Oct 30, 2020
my miscelaneous docker cheat sheet
View docker-cheat-sheet.md

rcmorano docker cheat sheet

Remove recursively zombie containers

In e.g.: you 'docker run -t -i' a 'bash' session and '.bashrc' is fucked up, container will forever respawn disallowing you to 'docker rmi' the used image .

docker rmi triangle/ubuntu-saucy-with-rvm 2>&1|grep ^Error|awk '{print $10}'|xargs docker rm
View apache-and-tomcat-logs.json
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,