Skip to content

Instantly share code, notes, and snippets.

@KonradIT
KonradIT / readme.md
Last active July 11, 2024 20:46
GoPro Studio for Linux
@kkung
kkung / example.md
Last active September 22, 2017 14:24
Getting AWS RDS Log files
$ python get_logs.py rds-db-instance-name rds.log aws-access-key aws-secret-key
$ ./pgbadger -p '%t:%r:%u@%d:[%p]:' ./rds.log

$ open out.html

@manute
manute / gist:8852537
Last active September 2, 2016 15:41
Riemann Service Down Alerts
;
; Riemann Service Down Alerts
; ===================================================
;
; The index stores the most recent state for any [host, service] pair. Clients
; can search the index for various states with a basic query language. The
; default implementation is a NonBlockingHashMap.
;
(let [my-index (index)
@oroce
oroce / nginx.conf
Created January 31, 2014 20:40
nginx config for using grafana, elasticsearch and graphite with authentication.
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
@elithrar
elithrar / wale_postgres_recovery.md
Last active May 3, 2021 15:38
WAL-E + Postgres 9.x (single server + DB) Setup and Recovery

A quick "how to" on what you need to do to both setup AND recover a single-server PostgreSQL database using WAL-E

  • WAL-E: https://github.com/wal-e/wal-e
  • Assuming Ubuntu 12.04 LTS ("Precise")
  • We'll be using S3. Make sure you have an IAM in a group with GetObject, ListBucket and PutObject on the bucket you want to use (and that it's not public).

Setup:

  1. These packages:
@rantav
rantav / riemann-maintenance-mode.rb
Last active September 3, 2016 15:48
Riemann example how to check whether a host is in maintenance mode. And Ruby code to set/unset maintenance mode.
vagrant@precise64:~$ irb
1.9.3-p484 :002 > require "riemann"
=> true
# Activate maintenance-mode:
1.9.3-p484 :010 > Riemann::Client.new << {service: "maintenance-mode", host: "precise64", state: "active", ttl: Float::INFINITY}
=> nil
# Deactivate maintenance-mode:
1.9.3-p484 :011 > Riemann::Client.new << {service: "maintenance-mode", host: "precise64", state: nil, ttl: Float::INFINITY}
=> nil
@jwal
jwal / example-logging.yaml
Created January 4, 2014 18:28
Example logging configuration for Python and Circus using YAML
version: 1
formatters:
simple:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
handlers:
console:
class: logging.StreamHandler
level: DEBUG
formatter: simple
stream: ext://sys.stdout
@admackin
admackin / .bashrc
Last active February 10, 2022 22:06
Sane SSH_AUTH_SOCK handling for Screen and Tmux, so that new SSH agents created by subsequent logons are still usable.
_ssh_auth_save() {
ln -sf "$SSH_AUTH_SOCK" "$HOME/.ssh/ssh-auth-sock.$HOSTNAME"
}
alias screen='_ssh_auth_save ; export HOSTNAME=$(hostname) ; screen'
alias tmux='_ssh_auth_save ; export HOSTNAME=$(hostname) ; tmux'
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@clstokes
clstokes / tomcat7
Created September 25, 2012 21:06
Enable JMX in Tomcat 7 on Ubuntu
#
# Since I have to look this up every time...
#
# Add the following in /etc/default/tomcat7
#
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=9991"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"