Skip to content

Instantly share code, notes, and snippets.

View dsyph3r's full-sized avatar

Darren Rees dsyph3r

View GitHub Profile

(check the pt_BR version here) Updating your Heroku SSL certificate

To generate the new SSL you need to follow these steps:

  • @dev Generate a .CSR (a key text file);
  • @dev Send the .CSR to your certificate authority (We use TheSSLstore);
    • @dev Verify the domain ownership through email (you can also put a file at your http server);
    • @dev Download the .CRT file (probably a zipball with a bunch of .CRT files);
  • @dev Brew the bundle.crt
@dsyph3r
dsyph3r / symfony2_gitignore
Created August 23, 2011 18:51
Symfony2 Git Ignore files
app/config/parameters.ini
vendor/*
app/cache/*
app/logs/*
web/bundles/*
app/DoctrineMigrations
*~
@dsyph3r
dsyph3r / example_behaviour.php
Created April 27, 2011 07:25
Blog: Doctrine 1: Overriding the Constructor
$this->log("Creating new blog...");
$blog = new Blog();
$blog->setAuthor("Author");
$blog->setComment("Hello, World");
$this->log("isNew: " . (($blog->isNew()) ? "true" : "false"));
$blog->save();
$this->log("\nSaving blog...");
$this->log("isNew: " . (($blog->isNew()) ? "true" : "false"));
@dsyph3r
dsyph3r / apache_virtual_host.txt
Created April 3, 2011 18:10
Symfony 2: Click
<VirtualHost 127.0.0.1:80>
ServerName click.dev
DocumentRoot "/var/www/html/click.dev/web"
DirectoryIndex app.php
<Directory "/var/www/html/click.dev/web">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
@dsyph3r
dsyph3r / configure_dynamic_vhost.txt
Created March 21, 2011 21:04
Blog: Apache: Dynamic Virtual Hosts
NameVirtualHost *:80
UseCanonicalName Off
<VirtualHost *:80>
VirtualDocumentRoot /var/www/html/domains/%0
</VirtualHost>
@dsyph3r
dsyph3r / ki_table_proxy.php
Created March 21, 2011 20:19
Blog: Symfony and Doctrine: Behaviors
public function retrieveByKiTableProxy($ki) {
$table = $this->getInvoker()->getTable();
return Doctrine_Query::create()
->from($table->getComponentName() . ' t')
->where('t.ki = ?', $ki)
->fetchOne();
}
@dsyph3r
dsyph3r / word_of_the_day.rb
Created March 21, 2011 20:14
Blog: Ruby Ruby Ruby Ruby
require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'
require 'cgi'
source = "http://feeds.urbandictionary.com/UrbanWordOfTheDay"
content = ""
@dsyph3r
dsyph3r / template_inheritance_and_override.twig
Created March 21, 2011 20:07
Blog: Symfony 2, Doctrine 2 and Twig: First impressions
{% block sidebar %}
<h3>Navigation</h3>
{{ parent() }}
{% endblock %}
@dsyph3r
dsyph3r / configure_default_folder_layout_symfony_1_4.php
Created March 21, 2011 20:01
Blog: Symfony 1.4: Configuring Default Folder Structure
$this->setWebDir(dirname($this->getRootDir()).'/public_html');
sfConfig::set('sf_upload_dir', dirname($this->getRootDir()).'/uploads');