Skip to content

Instantly share code, notes, and snippets.

View marcoscoelho's full-sized avatar
🐰
welcome

Marcos Coelho marcoscoelho

🐰
welcome
View GitHub Profile

Keybase proof

I hereby claim:

  • I am marcoscoelho on github.
  • I am marcoscoelho (https://keybase.io/marcoscoelho) on keybase.
  • I have a public key whose fingerprint is 3919 D510 FD38 02BE 3325 40DC 13BD A77B 15FB 364C

To claim this, I am signing this object:

Prefix: Description

  • NEW: New feature
  • CHG: Change
  • FIX: Fixture
  • REL: Release
  • LNG: Language
  • ENH: Enhancement
  • BKP: Backup
  • DEL: Deletion
Tutorial for compiling the Compass.app (http://compass.handlino.com/)
=====================================================================
Java installed?
java -version
Load jRuby (for example JRuby 1.6.5.1 Binary .zip)
http://jruby.org/download
Unzip jRuby to `/usr/local/`
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
@marcoscoelho
marcoscoelho / template_metadata.html
Created September 2, 2011 19:32
PyroCMS metadata places
<html>
<head>
{pyro:template:metadata} <!-- // default is "header", as {pyro:template:metadata in="header"} -->
</head>
<body>
{pyro:template:metadata in="body"}
[...]
{pyro:template:metadata in="footer"}
</body>
</html>
@marcoscoelho
marcoscoelho / text_helper.php
Created August 25, 2011 07:22
This function is similar to two native functions from CI (ellipsize and character_limiter) but more ruthless (non-preserves words), flexible (dont alters or strip anything in your string, because you can do it easily if necessary) and accurate (passed in
<?php defined('BASEPATH') OR exit('No direct script access allowed.');
/**
* Character Limiter Mid
*
* Limits the string representing the characters removed from somewhere from
* their mid. This limiter considers the output string as two parts (start and
* end) and not preserves complete words, so you also can chose exactly how many
* characters at start and end you need have.
*
@marcoscoelho
marcoscoelho / output.html
Created August 12, 2011 00:46
Testing plugin files
<h1>test files plugin</h1>
<h2>double</h2>
<ul>
{pyro:files:listing folder="1"}
<li>{filename}</li>
{/pyro:files:listing}
</ul>
@marcoscoelho
marcoscoelho / developerquiz.php
Created August 9, 2011 14:33 — forked from alganet/developerquiz.php
Full script for the Google Developer Day Quiz (http://developerquiz.appspot.com) in 39 lines (max: 80 char/line)
<?php isset($argv[1]) OR die('Input file should be the first arg on cmd line.');
const G_FOO = 'bjdrf'; //Googlon special letters
const G_INV = 'c'; //Preposition invalidator
const G_PREP = 3; //Preposition size
const G_VERB = 6; //Verb size
const G_ORDER = 'gkvrbjwtnlphzfmdxcqs'; //Letter ordering
const G_NUM_MOD = 5; //Pretty number divisor
const G_NUM_MAX = 860533; //Pretty number minimum
<ul>
{pyro:files:listing folder="root/subfolder" type="i"}
<li>
* {id}
* {folder_id}
* {user_id}
* {type}
* {name}
* {filename}
* {description}
@marcoscoelho
marcoscoelho / files_helper.php
Created August 8, 2011 20:16
Helper file of the "Files module" to PyroCMS
<?php defined('BASEPATH') OR exit('No direct script access allowed.');
/**
* CodeIgniter Files Helpers
*
* @package CodeIgniter
* @subpackage Helpers
* @category Helpers
* @author PyroCMS development team
*/