Skip to content

Instantly share code, notes, and snippets.

@malgorath
malgorath / gist:438f1048f2908e13b4b5
Created March 3, 2015 21:50
manage.py migrate blog with widgy error
(testing)SCOTTs-Mac-Pro-2:malgorath1 scott$ ./manage.py migrate blog
/Users/scott/.virtualenvs/testing/lib/python2.7/site-packages/widgy/utils.py:152: RemovedInDjango18Warning: `SelectRelatedManager.get_query_set` method should be renamed `get_queryset`.
class SelectRelatedManager(models.Manager):
/Users/scott/.virtualenvs/testing/lib/python2.7/site-packages/scss/__init__.py:86: RuntimeWarning: Scanning acceleration disabled (_speedups not found)!
RuntimeWarning
Operations to perform:
Apply all migrations: blog
Running migrations:
@malgorath
malgorath / send_form.txt
Created January 19, 2015 19:02
Text file for emailing
Boarding Form for {{ request.form['dog_name'] }} the {{ request.POST['dog_breed'] }}
------------------------------------------------------------------------------------
{% for field in form %}
{{ field.label }}: {{ field.value }}
{% endfor %}
Sent from {{ request.META['REMOTE_ADDR'] }} at {% now "jS F Y H:i" %}
@malgorath
malgorath / index.php
Created December 10, 2014 20:00
/public/index.php
<?php
require '../vendor/autoload.php';
require '../config.php';
session_start();
# initialize $app to contain slim framework
$app = new \Slim\Slim();
# setup configurations for $app
$app->config('debug', true);
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.4
- RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [x86_64-darwin14.0]
- INSTALLATION DIRECTORY: /Users/scott/.gem/ruby/2.1.5
- RUBY EXECUTABLE: /Users/scott/.rubies/ruby-2.1.5/bin/ruby
- EXECUTABLE DIRECTORY: /Users/scott/.gem/ruby/2.1.5/bin
- SPEC CACHE DIRECTORY: /Users/scott/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/scott/.rubies/ruby-2.1.5/etc
- RUBYGEMS PLATFORMS:
@malgorath
malgorath / Error
Created November 25, 2014 17:25
Can not load site on one system but works on another. Running on a Vagrant Box of the exact same settings on both systems.
Illuminate\Database\QueryException thrown with message "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'order clause' (SQL: select * from `news` order by `updated_at` desc limit 3)"
Stacktrace:
#28 Illuminate\Database\QueryException in /home/vagrant/Code/canineharmony/vendor/laravel/framework/src/Illuminate/Database/Connection.php:625
#27 HomeController:index in <#unknown>:0
#26 Illuminate\Routing\Router:Illuminate\Routing\{closure} in <#unknown>:0
#25 PDOException in /home/vagrant/Code/canineharmony/vendor/laravel/framework/src/Illuminate/Database/Connection.php:299
#24 PDO:prepare in /home/vagrant/Code/canineharmony/vendor/laravel/framework/src/Illuminate/Database/Connection.php:299
#23 Illuminate\Database\Connection:Illuminate\Database\{closure} in /home/vagrant/Code/canineharmony/vendor/laravel/framework/src/Illuminate/Database/Connection.php:617
#22 Illuminate\Database\Connection:runQueryCallback in /home/vagrant/Code/canineharmony/vendor/laravel/framework/src/Illuminate/Database
<?php
namespace App;
class HomeController {
private $app;
public function __construct() {
$this->app = \Slim\Slim::getInstance();
}