Skip to content

Instantly share code, notes, and snippets.

View BrianGilbert's full-sized avatar

Brian Gilbert BrianGilbert

View GitHub Profile
<style>
.twitter-btn {
font: normal normal normal 13px/26px 'Helvetica Neue',Arial,sans-serif;
height: 28px;
border-radius: 4px;
max-width: 100%;
box-sizing: border-box;
position: relative;
background-color: #F8F8F8;
@BrianGilbert
BrianGilbert / advcomp.rb
Last active December 23, 2015 16:59
advcomp Homebrew Formula (advpng and advdef)
require 'formula'
class Advcomp < Formula
homepage 'http://advancemame.sourceforge.net/'
url 'http://downloads.sourceforge.net/project/advancemame/advancecomp/1.17/advancecomp-1.17.tar.gz'
sha256 '856d064e064c6105986b7cc29d6e2cba477e9ffca4a8830631161f5e7cd18e82'
def install
system "./configure"
system "make install"
@BrianGilbert
BrianGilbert / pngout.rb
Last active March 11, 2016 17:35 — forked from paulredmond/pngout.rb
PNGOut Homebrew Formula
require 'formula'
class Pngout < Formula
url 'http://static.jonof.id.au/dl/kenutils/pngout-20130221-darwin.tar.gz'
homepage 'http://www.jonof.id.au/kenutils'
sha256 '995cc1df35e68b723c8143ad82c058be763f9af4fc373894ec74de3e7f18d0dd'
version '20130221'
def install
prefix.install Dir['*']
@BrianGilbert
BrianGilbert / nginx_static_include.conf
Last active September 8, 2017 11:07 — forked from omega8cc/gist:1677848
Create it as: /var/aegir/config/includes/nginx_static_include.conf
#######################################################
### nginx compact basic configuration start
#######################################################
###
### deny crawlers and bots without 403 response
###
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|wget|AutomaticSiteMap|bot) ) {
return 444;
}
@BrianGilbert
BrianGilbert / wordpress-vhost.conf
Created August 14, 2013 01:03
Example wordpress vhost for aegir box, also see https://gist.github.com/BrianGilbert/6227135
server {
include /var/aegir/config/includes/fastcgi_params.conf;
limit_conn gulag 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address
listen *:80;
server_name wordpress.domain.name;
root /var/www/siteroot;
# Extra configuration from modules:
include /var/aegir/config/includes/nginx_wp_include.conf;
}
@BrianGilbert
BrianGilbert / nginx_wp_include.conf
Last active April 25, 2022 11:55 — forked from omega8cc/gist:1677835
Create it as: /var/aegir/config/includes/nginx_wp_include.conf and add it in your custom vhost eg. https://gist.github.com/BrianGilbert/6227181
#######################################################
### nginx.conf site wp vhost include start
#######################################################
###
### deny crawlers without 403 response
###
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|wget) ) {
return 444;
}
@BrianGilbert
BrianGilbert / com.apache.solr.plist
Last active December 20, 2015 22:49
Solr plist for homebrew solr 4.4.0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC
"-//Apple Computer//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.apache.solr</string>
<key>ProgramArguments</key>
<array>
@BrianGilbert
BrianGilbert / my-drupal.cnf
Created August 11, 2013 23:18
Mariadb config for OSXAegirInstaller
# Example MariaDB config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MariaDB.
#
# MariaDB programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, do:
# 'my_print_defaults --help' and see what is printed under
@BrianGilbert
BrianGilbert / nginx.rb
Last active December 19, 2015 05:59
nginx formula for Aegir setup
require 'formula'
class Nginx < Formula
homepage 'http://nginx.org/'
url 'http://nginx.org/download/nginx-1.4.2.tar.gz'
sha1 '8f006dc773840b6624a137a584ff8850d5155e3f'
devel do
url 'http://nginx.org/download/nginx-1.5.5.tar.gz'
sha1 '8526d41cdabcd40d4ffa5ae12c8a2cc325255431'
@BrianGilbert
BrianGilbert / nginx.conf
Last active December 19, 2015 05:59
nginx.conf for OS X Aegir setup
# Nginx web server main configuration file /usr/local/etc/nginx/nginx.conf
#
user [username] staff;
worker_processes 4;
pid /usr/local/var/run/nginx.pid;
error_log /var/log/aegir/nginx-error.log info; #debug;
events {
multi_accept on;
}