Skip to content

Instantly share code, notes, and snippets.

View aalmenar's full-sized avatar
🏚️

Adrian aalmenar

🏚️
View GitHub Profile
# SRS
127.0.0.1:10001 stream tcp nowait root /opt/srs/srs-encode.sh /opt/srs/srs-encode.sh
127.0.0.1:10002 stream tcp nowait root /opt/srs/srs-decode.sh /opt/srs/srs-decode.sh
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.
server {
server_name domain.com;
listen 443 ssl spdy;
root /home/webmaster/www/domain.com;
index index.php index.html;
# SSL configuration
ssl_certificate /home/webmaster/certs/domain.com.crt;
ssl_certificate_key /home/webmaster/certs/domain.com.key;
@aalmenar
aalmenar / README.md
Last active August 29, 2015 14:24 — forked from miguelmota/README.md
How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@aalmenar
aalmenar / gist:7271634f8742f2a61d77
Created July 12, 2015 15:12
Munin-For-Android Issue 23
<div id="content">
<h2>Overview</h2>
<ul class="groupview">
<li >
<span class="domain"><a href="Backuppc/index.html">Backuppc</a></span>
:: [
<a href="./Backuppc/comparison-day.html">day</a>
<a href="./Backuppc/comparison-week.html">week</a>

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.

@aalmenar
aalmenar / openssl.rb
Created October 5, 2015 08:48
OpenSSL Homebrew brew formula that allows additional configuration via env var CONFIGURE_OPTS
require "formula"
class Openssl < Formula
homepage "http://openssl.org"
url "https://www.openssl.org/source/openssl-1.0.2d.tar.gz"
mirror "http://fossies.org/linux/misc/openssl-1.0.2d.tar.gz"
sha256 "671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8"
# bottle do
# sha1 "3d0e5529a124be70266dd2a2074f4f84db38bb19" => :yosemite
@aalmenar
aalmenar / pushover_handler.rb
Created January 26, 2016 22:27 — forked from juanje/pushover_handler.rb
Example of Chef hanfler for sending run fails to Pushover (notifications to iPhone and Android) https://pushover.net/
# cookbook/files/default/pushover_handler.rb
require "net/https"
module MyOrg
class PushOver < Chef::Handler
def initialize(config={})
@config = config
end
From 3a8fe43e9e073f26e44f62ad072079acd8b78de3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= <buenemann@louis.info>
Date: Mon, 30 May 2016 00:00:29 +0200
Subject: [PATCH] Add SPDY support back to Nginx with HTTP/2
Ported to 1.9.15 from 1.9.7 patch by Jiale Zhi from CloudFlare with
additional fixes to re-enable deprecated spdy directives and fix
compilation with http_v2 module enabled and spdy disabled.
---
auto/modules | 31 +
@aalmenar
aalmenar / statsd-graphite-install.sh
Created October 19, 2016 14:50 — forked from jgeurts/statsd-graphite-install.sh
Install statsd and graphite as a services on Ubuntu 13.10
sudo apt-get install --assume-yes python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --assume-yes nodejs
sudo apt-get install --assume-yes git
# Install Graphite
sudo apt-get install python-dev ruby-dev bundler build-essential libpcre3-dev graphite-carbon graphite-web
cat >> /tmp/graphite-carbon << EOF
# Change to true, to enable carbon-cache on boot