Skip to content

Instantly share code, notes, and snippets.

View ylluminate's full-sized avatar

ylluminate ylluminate

View GitHub Profile
@ylluminate
ylluminate / Gemfile
Created July 28, 2011 18:00
ChiliProject Gemfile
source :rubygems
gem "rails", "2.3.12"
gem "coderay", "~> 0.9.7"
gem "i18n", "~> 0.4.2"
gem "rubytree", "~> 0.5.2", :require => 'tree'
gem "rdoc", ">= 2.4.2"
group :test do
@ylluminate
ylluminate / Gemfile
Created February 21, 2012 20:55
Example BrowserCMS Gemfile for Heroku
source 'http://rubygems.org'
gem 'rails', '3.0.9'
gem 'heroku'#, "~> 2.20" # shouldn't need this, but I've had to force Heroku version before.
gem 'rubyzip'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'thin', '1.3.1' # Heroku Cedar has added this as a requirement, otherwise it WILL use webrick & of course we don't want that.
@ylluminate
ylluminate / rasterize.js
Created February 22, 2012 18:42
PhantomJS - Rendering a page to image
// As explained here: http://code.google.com/p/phantomjs/wiki/QuickStart
var page = new WebPage(),
address, output, size;
if (phantom.args.length < 2 || phantom.args.length > 3) {
console.log('Usage: rasterize.js URL filename');
phantom.exit();
} else {
address = phantom.args[0];
@ylluminate
ylluminate / rmate.rb
Created February 29, 2012 23:09
rmate script to use on remote hosts
#!/usr/bin/env ruby
# encoding: UTF-8
$VERBOSE = true # -w
$KCODE = "U" if RUBY_VERSION < "1.9" # -KU
require 'optparse'
require 'socket'
require 'fileutils'
@ylluminate
ylluminate / base.html.erb
Created March 5, 2012 19:54
new typus base.html.erb
<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
<%= render 'admin/shared/head' %>
</head>
<body>
@ylluminate
ylluminate / convert_currency.rb
Created September 11, 2012 23:05
Use Google calculator to convert currency in Ruby
require 'faraday'
require 'faraday_middleware'
require 'json'
# Debug:
# require "pry"
country_code_src = "USD"
@ylluminate
ylluminate / gist:3890458
Created October 15, 2012 01:59 — forked from jugyo/gist:865475
TextMate command to convert slim to html
#!/usr/bin/env ruby
# Input: Selected Text or Nothing
# Output: Replace Selected Text
require 'tempfile'
def unindent(text)
lines = text.split(/\n/)
level = lines.map{|l| l[/^\s*/].size}.min
@ylluminate
ylluminate / ocp.php
Created April 14, 2013 00:57 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@ylluminate
ylluminate / Rails CMS Options
Last active December 20, 2015 12:09
Up-to-date list of Rails CMS options (Ruby on Rails CMS, both engine and stand alone)
Rails CMS Options
======================
Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then.
Active projects:
---------------
LocomotiveCMS
repo: https://github.com/locomotivecms/engine
site: http://www.locomotivecms.com
Last update: Jul 21, 2013
@ylluminate
ylluminate / -
Created September 24, 2013 05:59
test