Skip to content

Instantly share code, notes, and snippets.

View BrianGilbert's full-sized avatar

Brian Gilbert BrianGilbert

View GitHub Profile
@BrianGilbert
BrianGilbert / nginx_ojs_include.conf
Last active January 8, 2021 07:04
nginx configuration for OJS on an aegir box
#######################################################
### nginx compact ojs configuration start
#######################################################
location ~ /\.ht {
deny all;
}
location ~ ^/cache(.*)$ {
deny all;
@BrianGilbert
BrianGilbert / gist:cd88e274fe87a1b5ad58
Created September 30, 2014 14:17
Install OS X command line tools (10.9+)
xcode-select --install
@BrianGilbert
BrianGilbert / ipaddress.pl
Created September 16, 2014 20:19
Get internal and public IP addresses (used with geektool)
#!/usr/bin/perl
# a little script to get your network status
$en0_info = `ifconfig en0 | grep "inet" | grep -v 127.0.0.1`;
$en2_info = `ifconfig en2 | grep "inet" | grep -v 127.0.0.1`;
$en4_info = `ifconfig en4 | grep "inet" | grep -v 127.0.0.1`;
$ext_info = `curl --silent http://checkip.dyndns.org | awk '{printf \$6}' | cut -f 1 -d "<" | tr -d '\n'`;
$airport_network = `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk -F: '/ SSID/ {print \$2}' | tr -d ' '`;
if($ext_info)
Verifying myself: My Bitcoin username is +briangilbert. https://onename.io/briangilbert
# prevent the creation of .DS_Store files on network drives
# http://hints.macworld.com/article.php?story=2005070300463515
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
#---------------------------------------------------------------------
# Disable/enable Dashboard:
# http://hints.macworld.com/article.php?story=20050723123302403
defaults write com.apple.dashboard mcx-disabled -boolean YES
diff --git a/wordcount/plugin.js b/wordcount/plugin.js
index 4fa20d6..2177247 100644
--- a/wordcount/plugin.js
+++ b/wordcount/plugin.js
@@ -21,7 +21,7 @@ CKEDITOR.plugins.add('wordcount', {
// Default Config
var defaultConfig = {
showWordCount: true,
- showCharCount: false,
+ showCharCount: true,
@BrianGilbert
BrianGilbert / showprotected-dialog-changes.patch
Created June 30, 2014 01:37
Patch Showprotected plugin to use textarea and have bigger dialog window
diff --git a/showprotected/dialogs/protected.js b/showprotected/dialogs/protected.js
index 9c7ede3..8a06f04 100644
--- a/showprotected/dialogs/protected.js
+++ b/showprotected/dialogs/protected.js
@@ -3,13 +3,13 @@ CKEDITOR.dialog.add( 'showProtectedDialog', function( editor ) {
return {
title: 'Edit Protected Source',
- minWidth: 300,
- minHeight: 60,
@BrianGilbert
BrianGilbert / nginx_xhprof.ld.conf
Last active August 29, 2015 13:56
XHProf configuration for OSX Aegir installer
###
### Custom site for xhprof.
###
server {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
limit_conn limreq 32; # like mod_evasive - this allows max 32 simultaneous connections from one IP address
listen *:80;
server_name xhprof.ld;
@BrianGilbert
BrianGilbert / org.aegir.hosting.queued.plist
Last active August 29, 2015 13:56
launchctl plist for running Aegir queue daemon
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
@BrianGilbert
BrianGilbert / nginx_wild_ssl.conf
Last active December 30, 2015 02:09
SSL config file for OSX Aegir installer, goes in /var/aegir/config/server_master/nginx/pre.d
### /var/aegir/config/server_master/nginx/pre.d/nginx_wild_ssl.conf
upstream nginx_http {
server localhost:80;
}
server {
listen *:443 ssl spdy;
server_name _;
ssl on;
ssl_certificate /usr/local/etc/ssl/private/nginx-wild-ssl.crt;
ssl_certificate_key /usr/local/etc/ssl/private/nginx-wild-ssl.key;