Skip to content

Instantly share code, notes, and snippets.

View russellballestrini's full-sized avatar
💭
https://www.makepostsell.com

Russell russellballestrini

💭
https://www.makepostsell.com
View GitHub Profile
@conorbranagan
conorbranagan / gist:4513828
Last active May 18, 2024 21:28
Linux System Metrics

Linux System Metrics

CPU

  • system.cpu.idle: % Idle CPU
  • system.cpu.system: % System CPU
  • system.cpu.user: % User CPU

Disk

@jathanism
jathanism / dictobject.py
Last active December 9, 2015 20:28
A dictionary-like object to recursively (or not) represent its items as attributes, but still behaves like a dict in every way.
# -*- coding: utf-8 -*_
"""
A dictionary-like object to represent items as attributes, but still behaves
like a dict in every way.
"""
__author__ = 'Jathan McCollum'
__maintainer__ = 'Jathan McCollum'
__email__ = 'jathanism@aol.com'
@tshirtman
tshirtman / Ground_(front_layer).png
Created October 10, 2012 22:37
This gist show how to build a scrolling and repeating background with kivy
Ground_(front_layer).png
@asenchi
asenchi / logstash-mysql-query-parse.md
Created September 20, 2012 01:06 — forked from jordansissel/logstash-mysql-query-parse.md
parsing mysql's bullshit query log format with logstash

parsing mysql query logs with logstash

The problem is that some lines in the file are missing timestamps when they aren't continuations of any previous line. It's dumb, really.

The mysql query log is seriously bullshit format, but nothing logstash can't unscrew.

The main goal here is to show how we can fix the 'missing timestamp' problem.

% ruby bin/logstash agent -e '

@jordansissel
jordansissel / logstash-mysql-query-parse.md
Last active June 7, 2021 21:10
parsing mysql's query log format with logstash

parsing mysql query logs with logstash

The problem is that some lines in the file are missing timestamps when they aren't continuations of any previous line. It's dumb, really.

The mysql query log is seriously bullshit format, but nothing logstash can't unscrew.

The main goal here is to show how we can fix the 'missing timestamp' problem.

% ruby bin/logstash agent -e '

@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@kklimonda
kklimonda / pybrowser.py
Created March 28, 2011 15:18
A minimal Gtk+/Webkit based browser in Python
import sys
from gi.repository import Gtk, Gdk, WebKit
class BrowserTab(Gtk.VBox):
def __init__(self, *args, **kwargs):
super(BrowserTab, self).__init__(*args, **kwargs)
go_button = Gtk.Button("go to...")
go_button.connect("clicked", self._load_url)
self.url_bar = Gtk.Entry()