Skip to content

Instantly share code, notes, and snippets.

View mmcdaris's full-sized avatar

Morgan Mikel McDaris mmcdaris

View GitHub Profile
@probonopd
probonopd / Wayland.md
Last active July 28, 2024 05:14
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not e

@zachgoldstein
zachgoldstein / logstashToAirbrake.sh
Last active March 27, 2017 20:06
Load elasticsearch errors into airbrake
#!/bin/bash
echo "Make sure queryData.json is also downloaded"
read -p "Elasticsearch username: " esUser
read -p "Elasticsearch password: " esPass
read -p "Elasticsearch domain: " esAddress
read -p "Airbrake project key: " airbrakeProjectKey
read -p "Airbrake project id: " airbrakeProjectId
airbrakeHostname=https://airbrake.io
@trusche
trusche / statsd.md
Last active May 2, 2019 13:05
Installing graphite and statsd on OS X Yosemite

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Graphite

Install Cairo

There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps:

@sam-falvo
sam-falvo / gist:f8920f8a7c91fad4b601
Created November 9, 2014 04:16
A quick and dirty prototype of the Kestrel OS, STS 2. This implementation takes on a distinctly more Unix- or Plan-9-like flavor to the user and coder.
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
/****** fsobj.h ******/
struct scb;
@maxcal
maxcal / gist:8e7e0ee4ff83a3ad0c8a
Last active March 30, 2019 01:53 — forked from ismasan/gist:8217804
Rspec examples for HTTP caching
# Given a controller that looks like this
class ModelsController < ApplicationController
load_and_authorize_resource #CanCan
def show
if stale? @model
respond_to do |format|
format.json do
@model
end
@lfender6445
lfender6445 / gist:9919357
Last active July 25, 2024 02:05
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@stefansundin
stefansundin / install-pre-commit.sh
Last active September 17, 2023 11:46
Git pre-commit check to stop accidental commits to master/main/develop branches.
#!/bin/bash
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch.
# There are six variants that I have built:
# - pre-commit: stops commits to master/main/develop branches.
# - pre-commit-2: also includes a core.whitespace check.
# - pre-commit-3: the core.whitespace check and an EOF-newline-check.
# - pre-commit-4: only the core.whitespace check.
# - pre-commit-5: elixir formatting check.
# - pre-commit-6: prettier formatting check.
# Set the desired version like this before proceeding:
@tim-peterson
tim-peterson / Go Revel nginx.conf
Last active March 10, 2018 04:10
Revel Framework nginx.conf to make Revel app work outside of localhost, i.e., on my live, personal-website.com
http{
index index.html;
server {
listen 80;
root /gocode/src/personalwebsiteapp;
server_name personal-website.com;
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.