Skip to content

Instantly share code, notes, and snippets.

@Neener54
Neener54 / install_ruby.sh
Last active October 10, 2015 05:57
Custom Version of Rails Girls with rvm and what not
set -e
echo "Updates packages. Asks for your password."
sudo apt-get update -y
echo "Installs packages. Give your password when asked."
sudo apt-get install build-essential bison openssl libmagic-dev libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 mysql-client mysql-server libmysql-ruby libmysqlclient-dev libxml2-dev libxslt-dev autoconf libc6-dev nodejs -y
echo "Installs ImageMagick for image processing"
sudo apt-get install imagemagick --fix-missing -y
class SearchController < ApplicationController
# ACL
filter_access_to :all
def index
@search_params={}
@search_params[:content_types] = [params[:content_type]]
@search_params[:titles] = [params[:title]]
@search_params[:authors] = [params[:author]]
@search_params[:keywords] = [params[:keywords]]
@Neener54
Neener54 / editor.js
Created April 2, 2012 17:06
handlebars template
wysiwyg = {
wysihtml5 : function(){
// Global array of editor instances, necessary for being able to do custom functions later
editors = new Array();
$('textarea.wysihtml5').each(function(){
var currTextArea = $(this);
var currId = currTextArea.attr('id');
wysiwyg.toolbar(currTextArea);
editors[currId] = new wysihtml5.Editor(currId.toString(), {
name: 'wysihtml5_ed_'+currId,