I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Controller_Search extends Controller { | |
/** | |
* @var Database_Result | |
*/ | |
protected $_results; | |
/** |
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
application: YOURAPPNAME | |
version: 1 | |
runtime: python | |
api_version: 1 | |
handlers: | |
- url: / | |
static_files: index.html | |
upload: index.html | |
- url: /(.*) |
import akka.amqp.AMQP._ | |
import akka.amqp._ | |
import akka.actor._ | |
import java.util.concurrent.{TimeUnit, CountDownLatch} | |
import util.Random | |
object LoadBalancingDemo { | |
def main(args: Array[String]) { |
install PostgreSQL 9 in Mac OSX via Homebrew | |
Mac OS X Snow Leopard | |
System Version: Mac OS X 10.6.5 | |
Kernel Version: Darwin 10.5.0 | |
Install notes for PostgreSQL 9.0.1 install using Homebrew: | |
sh-3.2# brew install postgresql |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'active_support' | |
require 'mechanize' | |
require 'optparse' | |
require 'fileutils' | |
Version = "1.0.0" | |
options = { :tag => nil, :dir => 'downloads' } |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Color { | |
public static function hex_to_rgb($hex){ | |
$pattern = '/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/'; | |
preg_match($pattern, $hex, $matches); | |
$matches = array_slice($matches, 1); | |
if (!function_exists('map')){ | |
function map($value){ |