I hereby claim:
- I am aaronrussell on github.
- I am aaronrussell (https://keybase.io/aaronrussell) on keybase.
- I have a public key whose fingerprint is A5E8 8A17 8733 A3F8 34E9 A5DC D473 0945 D851 15F4
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| import sys | |
| import urllib, urllib2 | |
| import re | |
| import os | |
| import subprocess | |
| from datetime import datetime | |
| import simplejson as json |
| cd /var/discourse | |
| sudo ./launcher enter app | |
| cd /var/www/discourse | |
| rails c |
| # Standard database.yml file for MySQL-based Rails apps | |
| # Development and Production environments share defaults | |
| defaults: &defaults | |
| adapter: mysql | |
| encoding: utf8 | |
| host: localhost | |
| username: db_username | |
| password: db_password |
| <?php | |
| /* | |
| * 1. Find list line (about line 60) | |
| */ | |
| $replace = '<script type="text/javascript" src="' . trim($this->settings['script_path']) . '"></script>' . NL; | |
| /* | |
| * 2. Add DIRECTLY UNDERNEATH IT | |
| */ |
| /* | |
| Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. | |
| For licensing, see LICENSE.html or http://ckeditor.com/license | |
| */ | |
| CKEDITOR.editorConfig = function( config ) | |
| { | |
| // Define changes to default configuration here. For example: | |
| // config.language = 'fr'; | |
| // config.uiColor = '#AADC6E'; |
| var markers = []; | |
| var geocoder = new google.maps.Geocoder(); | |
| var local_search = new GlocalSearch(); | |
| var default_point = new google.maps.LatLng(53.800651, -4.064941); | |
| var default_map = { | |
| zoom: 5, | |
| center: default_point, | |
| mapTypeControl: true, | |
| mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, | |
| mapTypeId: google.maps.MapTypeId.ROADMAP |
| CKEDITOR.plugins.add('uploader',{ | |
| init:function(a){ | |
| var cmd = a.addCommand('uploader', {exec:uploader_onclick}); | |
| cmd.modes={wysiwyg:1,source:1}; | |
| cmd.canUndo=false; | |
| a.ui.addButton('uploader',{ label:'Upload an Image..', command:'uploader', icon:this.path+'images/icon.gif' }); | |
| } | |
| }) | |
| function uploader_onclick(e) |
| $('#insert_photo').submit(function() | |
| { | |
| var CKEDITOR = window.parent.CKEDITOR; | |
| var url = $('input:checked[name="img[size]"]').val(); | |
| var class = $('input:checked[name="img[align]"]').val(); | |
| var alt = $('#photo_alt').val(); | |
| var img = '<img src="'+url+'" class="'+class+'" alt="'+alt+'" />'; | |
| CKEDITOR.instances.article_body.insertHtml(img); | |
| window.parent.$.modal.close(); |
| <!-- | |
| The effect I'm trying to achieve is to have a floated DIV which contains an image and a caption. | |
| I can't guarantee the size of the image. It might be 200px, 400px or anything in-between. | |
| I wan't the floated DIV to stay the width of the image, and then the caption underneath to wrap | |
| onto multiple lines if it is wider than the image - rather than stretch the width of the DIV. | |
| --> | |
| <style> | |
| /* Here's a simplified version of my CSS */ | |
| div {background: #cecece; float:left;} |